mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-29 01:46:53 +00:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
961f487f5c | ||
|
|
002f9de93f | ||
|
|
c0820bbcb3 | ||
|
|
ecd984be2a | ||
|
|
21dde52d1f | ||
|
|
d94ec28b57 | ||
|
|
3e6c47a7a5 | ||
|
|
0814be718e | ||
|
|
bbaeb5e5be | ||
|
|
75d05206dc | ||
|
|
df635c484e | ||
|
|
1b5d4d7cc1 | ||
|
|
e824cbc6db | ||
|
|
f738042786 | ||
|
|
d19b867d9a | ||
|
|
472c4670d5 | ||
|
|
69b7f68379 | ||
|
|
de8274c360 | ||
|
|
e1a96ba654 | ||
|
|
0c0a49caae | ||
|
|
6cd996ce3c | ||
|
|
0d010e8841 | ||
|
|
ebd4c4146e | ||
|
|
43269c9255 | ||
|
|
847f8b9e21 | ||
|
|
2241db8a74 | ||
|
|
bed6520d27 | ||
|
|
08c3bbe201 | ||
|
|
de58d446f2 | ||
|
|
9e19286a9f | ||
|
|
f4d16549de | ||
|
|
a3c597425d | ||
|
|
56bbbca2ce | ||
|
|
dce582c64c | ||
|
|
ecca4cedea | ||
|
|
dc69b40681 | ||
|
|
1553b77a1d | ||
|
|
c7c39e598d | ||
|
|
c364e66114 | ||
|
|
31d62c5947 | ||
|
|
e4212472e2 | ||
|
|
0ff27c3b44 | ||
|
|
baf23f3ae2 | ||
|
|
c9c535178f | ||
|
|
86ff3eb02e | ||
|
|
2cec7a1779 | ||
|
|
bcebeddb83 | ||
|
|
745da8e325 | ||
|
|
b610b654cc | ||
|
|
6fdeca5709 | ||
|
|
e9900f9a8e | ||
|
|
b475239b4f | ||
|
|
a2f635449b |
@@ -1,3 +0,0 @@
|
||||
## Azure Pipelines Configuration
|
||||
|
||||
Please see the [Documentation](https://github.com/ansible/community/wiki/Testing:-Azure-Pipelines) for more information.
|
||||
@@ -1,410 +0,0 @@
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
schedules:
|
||||
- cron: 0 8 * * *
|
||||
displayName: Nightly (main)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- cron: 0 10 * * *
|
||||
displayName: Nightly (active stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-2
|
||||
- stable-3
|
||||
- cron: 0 11 * * 0
|
||||
displayName: Weekly (old stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-1
|
||||
|
||||
variables:
|
||||
- name: checkoutPath
|
||||
value: ansible_collections/community/general
|
||||
- name: coverageBranches
|
||||
value: main
|
||||
- name: pipelinesCoverage
|
||||
value: coverage
|
||||
- name: entryPoint
|
||||
value: tests/utils/shippable/shippable.sh
|
||||
- name: fetchDepth
|
||||
value: 0
|
||||
|
||||
resources:
|
||||
containers:
|
||||
- container: default
|
||||
image: quay.io/ansible/azure-pipelines-test-container:1.9.0
|
||||
|
||||
pool: Standard
|
||||
|
||||
stages:
|
||||
### Sanity
|
||||
- stage: Sanity_devel
|
||||
displayName: Sanity devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Test {0}
|
||||
testFormat: devel/sanity/{0}
|
||||
targets:
|
||||
- test: 1
|
||||
- test: 2
|
||||
- test: 3
|
||||
- test: 4
|
||||
- test: extra
|
||||
- stage: Sanity_2_11
|
||||
displayName: Sanity 2.11
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Test {0}
|
||||
testFormat: 2.11/sanity/{0}
|
||||
targets:
|
||||
- test: 1
|
||||
- test: 2
|
||||
- test: 3
|
||||
- test: 4
|
||||
- stage: Sanity_2_10
|
||||
displayName: Sanity 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Test {0}
|
||||
testFormat: 2.10/sanity/{0}
|
||||
targets:
|
||||
- test: 1
|
||||
- test: 2
|
||||
- test: 3
|
||||
- test: 4
|
||||
- stage: Sanity_2_9
|
||||
displayName: Sanity 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Test {0}
|
||||
testFormat: 2.9/sanity/{0}
|
||||
targets:
|
||||
- test: 1
|
||||
- test: 2
|
||||
- test: 3
|
||||
- test: 4
|
||||
### Units
|
||||
- stage: Units_devel
|
||||
displayName: Units devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: devel/units/{0}/1
|
||||
targets:
|
||||
- test: 2.6
|
||||
- test: 2.7
|
||||
- test: 3.5
|
||||
- test: 3.6
|
||||
- test: 3.7
|
||||
- test: 3.8
|
||||
- test: 3.9
|
||||
- test: '3.10'
|
||||
- stage: Units_2_11
|
||||
displayName: Units 2.11
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.11/units/{0}/1
|
||||
targets:
|
||||
- test: 2.6
|
||||
- test: 2.7
|
||||
- test: 3.5
|
||||
- test: 3.6
|
||||
- test: 3.7
|
||||
- test: 3.8
|
||||
- test: 3.9
|
||||
- stage: Units_2_10
|
||||
displayName: Units 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.10/units/{0}/1
|
||||
targets:
|
||||
- test: 2.6
|
||||
- test: 2.7
|
||||
- test: 3.5
|
||||
- test: 3.6
|
||||
- test: 3.7
|
||||
- test: 3.8
|
||||
- test: 3.9
|
||||
- stage: Units_2_9
|
||||
displayName: Units 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.9/units/{0}/1
|
||||
targets:
|
||||
- test: 2.6
|
||||
- test: 2.7
|
||||
- test: 3.5
|
||||
- test: 3.6
|
||||
- test: 3.7
|
||||
- test: 3.8
|
||||
|
||||
## Remote
|
||||
- stage: Remote_devel
|
||||
displayName: Remote devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: devel/{0}
|
||||
targets:
|
||||
- name: macOS 11.1
|
||||
test: macos/11.1
|
||||
- name: RHEL 7.9
|
||||
test: rhel/7.9
|
||||
- name: RHEL 8.4
|
||||
test: rhel/8.4
|
||||
- name: FreeBSD 12.2
|
||||
test: freebsd/12.2
|
||||
- name: FreeBSD 13.0
|
||||
test: freebsd/13.0
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- stage: Remote_2_11
|
||||
displayName: Remote 2.11
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.11/{0}
|
||||
targets:
|
||||
- name: macOS 11.1
|
||||
test: macos/11.1
|
||||
- name: RHEL 7.9
|
||||
test: rhel/7.9
|
||||
- name: RHEL 8.3
|
||||
test: rhel/8.3
|
||||
- name: FreeBSD 12.2
|
||||
test: freebsd/12.2
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
- stage: Remote_2_10
|
||||
displayName: Remote 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.10/{0}
|
||||
targets:
|
||||
- name: OS X 10.11
|
||||
test: osx/10.11
|
||||
- name: macOS 10.15
|
||||
test: macos/10.15
|
||||
- name: macOS 11.1
|
||||
test: macos/11.1
|
||||
- name: RHEL 7.8
|
||||
test: rhel/7.8
|
||||
- name: RHEL 8.2
|
||||
test: rhel/8.2
|
||||
- name: FreeBSD 12.1
|
||||
test: freebsd/12.1
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
- stage: Remote_2_9
|
||||
displayName: Remote 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.9/{0}
|
||||
targets:
|
||||
- name: RHEL 8.2
|
||||
test: rhel/8.2
|
||||
- name: FreeBSD 12.0
|
||||
test: freebsd/12.0
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
|
||||
### Docker
|
||||
- stage: Docker_devel
|
||||
displayName: Docker devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: devel/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 6
|
||||
test: centos6
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: Fedora 34
|
||||
test: fedora34
|
||||
- name: openSUSE 15 py2
|
||||
test: opensuse15py2
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
- name: Ubuntu 18.04
|
||||
test: ubuntu1804
|
||||
- name: Ubuntu 20.04
|
||||
test: ubuntu2004
|
||||
groups:
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- stage: Docker_2_11
|
||||
displayName: Docker 2.11
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.11/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
- name: Ubuntu 20.04
|
||||
test: ubuntu2004
|
||||
groups:
|
||||
- 2
|
||||
- 3
|
||||
- stage: Docker_2_10
|
||||
displayName: Docker 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.10/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 32
|
||||
test: fedora32
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
- name: Ubuntu 16.04
|
||||
test: ubuntu1604
|
||||
groups:
|
||||
- 2
|
||||
- 3
|
||||
- stage: Docker_2_9
|
||||
displayName: Docker 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.9/linux/{0}
|
||||
targets:
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 31
|
||||
test: fedora31
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
groups:
|
||||
- 2
|
||||
- 3
|
||||
|
||||
### Cloud
|
||||
- stage: Cloud_devel
|
||||
displayName: Cloud devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: devel/cloud/{0}/1
|
||||
targets:
|
||||
- test: 3.8
|
||||
- stage: Cloud_2_11
|
||||
displayName: Cloud 2.11
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.11/cloud/{0}/1
|
||||
targets:
|
||||
- test: 2.7
|
||||
- test: 3.6
|
||||
- stage: Cloud_2_10
|
||||
displayName: Cloud 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.10/cloud/{0}/1
|
||||
targets:
|
||||
- test: 3.6
|
||||
- stage: Cloud_2_9
|
||||
displayName: Cloud 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
nameFormat: Python {0}
|
||||
testFormat: 2.9/cloud/{0}/1
|
||||
targets:
|
||||
- test: 3.6
|
||||
- stage: Summary
|
||||
condition: succeededOrFailed()
|
||||
dependsOn:
|
||||
- Sanity_devel
|
||||
- Sanity_2_9
|
||||
- Sanity_2_10
|
||||
- Sanity_2_11
|
||||
- Units_devel
|
||||
- Units_2_9
|
||||
- Units_2_10
|
||||
- Units_2_11
|
||||
- Remote_devel
|
||||
- Remote_2_9
|
||||
- Remote_2_10
|
||||
- Remote_2_11
|
||||
- Docker_devel
|
||||
- Docker_2_9
|
||||
- Docker_2_10
|
||||
- Docker_2_11
|
||||
- Cloud_devel
|
||||
- Cloud_2_9
|
||||
- Cloud_2_10
|
||||
- Cloud_2_11
|
||||
jobs:
|
||||
- template: templates/coverage.yml
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Aggregate code coverage results for later processing.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
agent_temp_directory="$1"
|
||||
|
||||
PATH="${PWD}/bin:${PATH}"
|
||||
|
||||
mkdir "${agent_temp_directory}/coverage/"
|
||||
|
||||
options=(--venv --venv-system-site-packages --color -v)
|
||||
|
||||
ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}"
|
||||
|
||||
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
|
||||
# Only analyze coverage if the installed version of ansible-test supports it.
|
||||
# Doing so allows this script to work unmodified for multiple Ansible versions.
|
||||
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
|
||||
fi
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job.
|
||||
Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}"
|
||||
The recommended coverage artifact name format is: Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)
|
||||
Keep in mind that Azure Pipelines does not enforce unique job display names (only names).
|
||||
It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
|
||||
"""
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Main program entry point."""
|
||||
source_directory = sys.argv[1]
|
||||
|
||||
if '/ansible_collections/' in os.getcwd():
|
||||
output_path = "tests/output"
|
||||
else:
|
||||
output_path = "test/results"
|
||||
|
||||
destination_directory = os.path.join(output_path, 'coverage')
|
||||
|
||||
if not os.path.exists(destination_directory):
|
||||
os.makedirs(destination_directory)
|
||||
|
||||
jobs = {}
|
||||
count = 0
|
||||
|
||||
for name in os.listdir(source_directory):
|
||||
match = re.search('^Coverage (?P<attempt>[0-9]+) (?P<label>.+)$', name)
|
||||
label = match.group('label')
|
||||
attempt = int(match.group('attempt'))
|
||||
jobs[label] = max(attempt, jobs.get(label, 0))
|
||||
|
||||
for label, attempt in jobs.items():
|
||||
name = 'Coverage {attempt} {label}'.format(label=label, attempt=attempt)
|
||||
source = os.path.join(source_directory, name)
|
||||
source_files = os.listdir(source)
|
||||
|
||||
for source_file in source_files:
|
||||
source_path = os.path.join(source, source_file)
|
||||
destination_path = os.path.join(destination_directory, source_file + '.' + label)
|
||||
print('"%s" -> "%s"' % (source_path, destination_path))
|
||||
shutil.copyfile(source_path, destination_path)
|
||||
count += 1
|
||||
|
||||
print('Coverage file count: %d' % count)
|
||||
print('##vso[task.setVariable variable=coverageFileCount]%d' % count)
|
||||
print('##vso[task.setVariable variable=outputPath]%s' % output_path)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Check the test results and set variables for use in later steps.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
if [[ "$PWD" =~ /ansible_collections/ ]]; then
|
||||
output_path="tests/output"
|
||||
else
|
||||
output_path="test/results"
|
||||
fi
|
||||
|
||||
echo "##vso[task.setVariable variable=outputPath]${output_path}"
|
||||
|
||||
if compgen -G "${output_path}"'/junit/*.xml' > /dev/null; then
|
||||
echo "##vso[task.setVariable variable=haveTestResults]true"
|
||||
fi
|
||||
|
||||
if compgen -G "${output_path}"'/bot/ansible-test-*' > /dev/null; then
|
||||
echo "##vso[task.setVariable variable=haveBotResults]true"
|
||||
fi
|
||||
|
||||
if compgen -G "${output_path}"'/coverage/*' > /dev/null; then
|
||||
echo "##vso[task.setVariable variable=haveCoverageData]true"
|
||||
fi
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Upload code coverage reports to codecov.io.
|
||||
# Multiple coverage files from multiple languages are accepted and aggregated after upload.
|
||||
# Python coverage, as well as PowerShell and Python stubs can all be uploaded.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
output_path="$1"
|
||||
|
||||
curl --silent --show-error https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/codecov.sh > codecov.sh
|
||||
|
||||
for file in "${output_path}"/reports/coverage*.xml; do
|
||||
name="${file}"
|
||||
name="${name##*/}" # remove path
|
||||
name="${name##coverage=}" # remove 'coverage=' prefix if present
|
||||
name="${name%.xml}" # remove '.xml' suffix
|
||||
|
||||
bash codecov.sh \
|
||||
-f "${file}" \
|
||||
-n "${name}" \
|
||||
-X coveragepy \
|
||||
-X gcov \
|
||||
-X fix \
|
||||
-X search \
|
||||
-X xcode \
|
||||
|| echo "Failed to upload code coverage report to codecov.io: ${file}"
|
||||
done
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Generate code coverage reports for uploading to Azure Pipelines and codecov.io.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
PATH="${PWD}/bin:${PATH}"
|
||||
|
||||
if ! ansible-test --help >/dev/null 2>&1; then
|
||||
# Install the devel version of ansible-test for generating code coverage reports.
|
||||
# This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs).
|
||||
# Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used.
|
||||
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
fi
|
||||
|
||||
ansible-test coverage xml --stub --venv --venv-system-site-packages --color -v
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Configure the test environment and run the tests.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
entry_point="$1"
|
||||
test="$2"
|
||||
read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds
|
||||
|
||||
export COMMIT_MESSAGE
|
||||
export COMPLETE
|
||||
export COVERAGE
|
||||
export IS_PULL_REQUEST
|
||||
|
||||
if [ "${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" ]; then
|
||||
IS_PULL_REQUEST=true
|
||||
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD^2)
|
||||
else
|
||||
IS_PULL_REQUEST=
|
||||
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD)
|
||||
fi
|
||||
|
||||
COMPLETE=
|
||||
COVERAGE=
|
||||
|
||||
if [ "${BUILD_REASON}" = "Schedule" ]; then
|
||||
COMPLETE=yes
|
||||
|
||||
if printf '%s\n' "${coverage_branches[@]}" | grep -q "^${BUILD_SOURCEBRANCHNAME}$"; then
|
||||
COVERAGE=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
"${entry_point}" "${test}" 2>&1 | "$(dirname "$0")/time-command.py"
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
def main():
|
||||
"""Main program entry point."""
|
||||
start = time.time()
|
||||
|
||||
sys.stdin.reconfigure(errors='surrogateescape')
|
||||
sys.stdout.reconfigure(errors='surrogateescape')
|
||||
|
||||
for line in sys.stdin:
|
||||
seconds = time.time() - start
|
||||
sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line))
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -1,39 +0,0 @@
|
||||
# This template adds a job for processing code coverage data.
|
||||
# It will upload results to Azure Pipelines and codecov.io.
|
||||
# Use it from a job stage that completes after all other jobs have completed.
|
||||
# This can be done by placing it in a separate summary stage that runs after the test stage(s) have completed.
|
||||
|
||||
jobs:
|
||||
- job: Coverage
|
||||
displayName: Code Coverage
|
||||
container: default
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: $(fetchDepth)
|
||||
path: $(checkoutPath)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Coverage Data
|
||||
inputs:
|
||||
path: coverage/
|
||||
patterns: "Coverage */*=coverage.combined"
|
||||
- bash: .azure-pipelines/scripts/combine-coverage.py coverage/
|
||||
displayName: Combine Coverage Data
|
||||
- bash: .azure-pipelines/scripts/report-coverage.sh
|
||||
displayName: Generate Coverage Report
|
||||
condition: gt(variables.coverageFileCount, 0)
|
||||
- task: PublishCodeCoverageResults@1
|
||||
inputs:
|
||||
codeCoverageTool: Cobertura
|
||||
# Azure Pipelines only accepts a single coverage data file.
|
||||
# That means only Python or PowerShell coverage can be uploaded, but not both.
|
||||
# Set the "pipelinesCoverage" variable to determine which type is uploaded.
|
||||
# Use "coverage" for Python and "coverage-powershell" for PowerShell.
|
||||
summaryFileLocation: "$(outputPath)/reports/$(pipelinesCoverage).xml"
|
||||
displayName: Publish to Azure Pipelines
|
||||
condition: gt(variables.coverageFileCount, 0)
|
||||
- bash: .azure-pipelines/scripts/publish-codecov.sh "$(outputPath)"
|
||||
displayName: Publish to codecov.io
|
||||
condition: gt(variables.coverageFileCount, 0)
|
||||
continueOnError: true
|
||||
@@ -1,55 +0,0 @@
|
||||
# This template uses the provided targets and optional groups to generate a matrix which is then passed to the test template.
|
||||
# If this matrix template does not provide the required functionality, consider using the test template directly instead.
|
||||
|
||||
parameters:
|
||||
# A required list of dictionaries, one per test target.
|
||||
# Each item in the list must contain a "test" or "name" key.
|
||||
# Both may be provided. If one is omitted, the other will be used.
|
||||
- name: targets
|
||||
type: object
|
||||
|
||||
# An optional list of values which will be used to multiply the targets list into a matrix.
|
||||
# Values can be strings or numbers.
|
||||
- name: groups
|
||||
type: object
|
||||
default: []
|
||||
|
||||
# An optional format string used to generate the job name.
|
||||
# - {0} is the name of an item in the targets list.
|
||||
- name: nameFormat
|
||||
type: string
|
||||
default: "{0}"
|
||||
|
||||
# An optional format string used to generate the test name.
|
||||
# - {0} is the name of an item in the targets list.
|
||||
- name: testFormat
|
||||
type: string
|
||||
default: "{0}"
|
||||
|
||||
# An optional format string used to add the group to the job name.
|
||||
# {0} is the formatted name of an item in the targets list.
|
||||
# {{1}} is the group -- be sure to include the double "{{" and "}}".
|
||||
- name: nameGroupFormat
|
||||
type: string
|
||||
default: "{0} - {{1}}"
|
||||
|
||||
# An optional format string used to add the group to the test name.
|
||||
# {0} is the formatted test of an item in the targets list.
|
||||
# {{1}} is the group -- be sure to include the double "{{" and "}}".
|
||||
- name: testGroupFormat
|
||||
type: string
|
||||
default: "{0}/{{1}}"
|
||||
|
||||
jobs:
|
||||
- template: test.yml
|
||||
parameters:
|
||||
jobs:
|
||||
- ${{ if eq(length(parameters.groups), 0) }}:
|
||||
- ${{ each target in parameters.targets }}:
|
||||
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
|
||||
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
|
||||
- ${{ if not(eq(length(parameters.groups), 0)) }}:
|
||||
- ${{ each group in parameters.groups }}:
|
||||
- ${{ each target in parameters.targets }}:
|
||||
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
|
||||
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}
|
||||
@@ -1,45 +0,0 @@
|
||||
# This template uses the provided list of jobs to create test one or more test jobs.
|
||||
# It can be used directly if needed, or through the matrix template.
|
||||
|
||||
parameters:
|
||||
# A required list of dictionaries, one per test job.
|
||||
# Each item in the list must contain a "job" and "name" key.
|
||||
- name: jobs
|
||||
type: object
|
||||
|
||||
jobs:
|
||||
- ${{ each job in parameters.jobs }}:
|
||||
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
|
||||
displayName: ${{ job.name }}
|
||||
container: default
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: $(fetchDepth)
|
||||
path: $(checkoutPath)
|
||||
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)"
|
||||
displayName: Run Tests
|
||||
- bash: .azure-pipelines/scripts/process-results.sh
|
||||
condition: succeededOrFailed()
|
||||
displayName: Process Results
|
||||
- bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
|
||||
condition: eq(variables.haveCoverageData, 'true')
|
||||
displayName: Aggregate Coverage Data
|
||||
- task: PublishTestResults@2
|
||||
condition: eq(variables.haveTestResults, 'true')
|
||||
inputs:
|
||||
testResultsFiles: "$(outputPath)/junit/*.xml"
|
||||
displayName: Publish Test Results
|
||||
- task: PublishPipelineArtifact@1
|
||||
condition: eq(variables.haveBotResults, 'true')
|
||||
displayName: Publish Bot Results
|
||||
inputs:
|
||||
targetPath: "$(outputPath)/bot/"
|
||||
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
||||
- task: PublishPipelineArtifact@1
|
||||
condition: eq(variables.haveCoverageData, 'true')
|
||||
displayName: Publish Coverage Data
|
||||
inputs:
|
||||
targetPath: "$(Agent.TempDirectory)/coverage/"
|
||||
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
||||
1
.github/BOTMETA.yml
vendored
1
.github/BOTMETA.yml
vendored
@@ -1,3 +1,4 @@
|
||||
notifications: true
|
||||
automerge: true
|
||||
files:
|
||||
plugins/:
|
||||
|
||||
49
.github/workflows/codeql-analysis.yml
vendored
49
.github/workflows/codeql-analysis.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: "Code scanning - action"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '26 19 * * 1'
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -6,6 +6,55 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 1.0.0.
|
||||
|
||||
v2.5.9
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Final maintenance release of community.general major version 2.
|
||||
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- The community.general 2.x.y release stream is now effectively **End of Life**. No more releases will be made, and regular CI runs will stop.
|
||||
|
||||
v2.5.8
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Announcement release.
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- The community.general 2.x.y release stream will be **End of Life** on 2022-05-23, which coincides with the latest day that community.general 5.0.0 must be released (see `the Roadmap for Ansible 6 <https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/roadmap/COLLECTIONS_6.rst#release-schedule>`_). At this point, community.general 2.0.0 has been released almost 1.5 years ago. It received new features for half a year, bugfixes for another half a year, and has only been receiving major bugfixes or security fixes until then. Please note that we `recently decided to shorten this last period from one year to roughly six months <https://github.com/ansible-community/community-topics/issues/55>`_. Thank you very much to everyone who contributed to the 2.x.y releases!
|
||||
|
||||
v2.5.7
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Regular bugfix release. Please note that this is the last regular bugfix release, from now on only security fixes and major bugfixes will be accepted for the ``stable-2`` branch.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- gitlab_deploy_key - fix idempotency on projects with multiple deploy keys (https://github.com/ansible-collections/community.general/pull/3473).
|
||||
- gitlab_group_members - ``get_group_id`` return the group ID by matching ``full_path``, ``path`` or ``name`` (https://github.com/ansible-collections/community.general/pull/3400).
|
||||
- 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).
|
||||
- jboss - fix the deployment file permission issue when Jboss server is running under non-root user. The deployment file is copied with file content only. The file permission is set to ``440`` and belongs to root user. When the JBoss ``WildFly`` server is running under non-root user, it is unable to read the deployment file (https://github.com/ansible-collections/community.general/pull/3426).
|
||||
- logstash callback plugin - replace ``_option`` with ``context.CLIARGS`` to fix the plugin on ansible-base and ansible-core (https://github.com/ansible-collections/community.general/issues/2692).
|
||||
- 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 - 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/).
|
||||
- xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError`` due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673).
|
||||
- yaml callback plugin - avoid modifying PyYAML so that other plugins using it on the controller, like the ``to_yaml`` filter, do not produce different output (https://github.com/ansible-collections/community.general/issues/3471, https://github.com/ansible-collections/community.general/pull/3478).
|
||||
|
||||
v2.5.6
|
||||
======
|
||||
|
||||
@@ -509,7 +558,7 @@ Deprecated Features
|
||||
- puppet - deprecated undocumented parameter ``show_diff``, will be removed in 7.0.0. (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
- runit - unused parameter ``dist`` marked for deprecation (https://github.com/ansible-collections/community.general/pull/1830).
|
||||
- slackpkg - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
- urmpi - deprecated invalid parameter aliases ``update-cache`` and ``no-recommends``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
- urpmi - deprecated invalid parameter aliases ``update-cache`` and ``no-recommends``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
- xbps - deprecated invalid parameter alias ``update-cache``, will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
|
||||
Bugfixes
|
||||
|
||||
@@ -17,7 +17,7 @@ If you encounter abusive behavior violating the [Ansible Code of Conduct](https:
|
||||
|
||||
## Tested with Ansible
|
||||
|
||||
Tested with the current Ansible 2.9, ansible-base 2.10 and ansible-core 2.11 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
|
||||
Tested with the current Ansible 2.9, ansible-base 2.10, ansible-core 2.11 and ansible-core 2.12 releases. Ansible versions before 2.9.10 are not supported.
|
||||
|
||||
## External requirements
|
||||
|
||||
|
||||
@@ -1446,7 +1446,7 @@ releases:
|
||||
- runit - unused parameter ``dist`` marked for deprecation (https://github.com/ansible-collections/community.general/pull/1830).
|
||||
- slackpkg - deprecated invalid parameter alias ``update-cache``, will be removed
|
||||
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
- urmpi - deprecated invalid parameter aliases ``update-cache`` and ``no-recommends``,
|
||||
- urpmi - deprecated invalid parameter aliases ``update-cache`` and ``no-recommends``,
|
||||
will be removed in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
- xbps - deprecated invalid parameter alias ``update-cache``, will be removed
|
||||
in 5.0.0 (https://github.com/ansible-collections/community.general/pull/1927).
|
||||
@@ -2157,3 +2157,74 @@ releases:
|
||||
- 3285-pamd-updated-with-empty-args.yaml
|
||||
- 3336-openbsd_pkg-fix-KeyError.yml
|
||||
release_date: '2021-09-21'
|
||||
2.5.7:
|
||||
changes:
|
||||
bugfixes:
|
||||
- gitlab_deploy_key - fix idempotency on projects with multiple deploy keys
|
||||
(https://github.com/ansible-collections/community.general/pull/3473).
|
||||
- gitlab_group_members - ``get_group_id`` return the group ID by matching ``full_path``,
|
||||
``path`` or ``name`` (https://github.com/ansible-collections/community.general/pull/3400).
|
||||
- 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).
|
||||
- jboss - fix the deployment file permission issue when Jboss server is running
|
||||
under non-root user. The deployment file is copied with file content only.
|
||||
The file permission is set to ``440`` and belongs to root user. When the JBoss
|
||||
``WildFly`` server is running under non-root user, it is unable to read the
|
||||
deployment file (https://github.com/ansible-collections/community.general/pull/3426).
|
||||
- logstash callback plugin - replace ``_option`` with ``context.CLIARGS`` to
|
||||
fix the plugin on ansible-base and ansible-core (https://github.com/ansible-collections/community.general/issues/2692).
|
||||
- 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 - 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/).
|
||||
- xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError``
|
||||
due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673).
|
||||
- yaml callback plugin - avoid modifying PyYAML so that other plugins using
|
||||
it on the controller, like the ``to_yaml`` filter, do not produce different
|
||||
output (https://github.com/ansible-collections/community.general/issues/3471,
|
||||
https://github.com/ansible-collections/community.general/pull/3478).
|
||||
release_summary: Regular bugfix release. Please note that this is the last regular
|
||||
bugfix release, from now on only security fixes and major bugfixes will be
|
||||
accepted for the ``stable-2`` branch.
|
||||
fragments:
|
||||
- 2.5.7.yml
|
||||
- 2692-logstash-callback-plugin-replacing_options.yml
|
||||
- 3400-fix-gitLab-api-searches-always-return-first-found-match-3386.yml
|
||||
- 3404-redfish_utils-skip-manager-network-check.yml
|
||||
- 3426-copy-permissions-along-with-file-for-jboss-module.yml
|
||||
- 3473-gitlab_deploy_key-fix_idempotency.yml
|
||||
- 3478-yaml-callback.yml
|
||||
- 3561-fix-ipa-host-var-detection.yml
|
||||
- 3602-fix-gitlab_project_members-improve-search-method.yml
|
||||
- 3649-proxmox_group_info_TypeError.yml
|
||||
- 3675-xattr-handle-base64-values.yml
|
||||
release_date: '2021-11-09'
|
||||
2.5.8:
|
||||
changes:
|
||||
major_changes:
|
||||
- The community.general 2.x.y release stream will be **End of Life** on 2022-05-23,
|
||||
which coincides with the latest day that community.general 5.0.0 must be released
|
||||
(see `the Roadmap for Ansible 6 <https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/roadmap/COLLECTIONS_6.rst#release-schedule>`_).
|
||||
At this point, community.general 2.0.0 has been released almost 1.5 years
|
||||
ago. It received new features for half a year, bugfixes for another half a
|
||||
year, and has only been receiving major bugfixes or security fixes until then.
|
||||
Please note that we `recently decided to shorten this last period from one
|
||||
year to roughly six months <https://github.com/ansible-community/community-topics/issues/55>`_.
|
||||
Thank you very much to everyone who contributed to the 2.x.y releases!
|
||||
release_summary: Announcement release.
|
||||
fragments:
|
||||
- 2.5.8.yml
|
||||
- eol.yml
|
||||
release_date: '2022-01-31'
|
||||
2.5.9:
|
||||
changes:
|
||||
major_changes:
|
||||
- The community.general 2.x.y release stream is now effectively **End of Life**.
|
||||
No more releases will be made, and regular CI runs will stop.
|
||||
release_summary: 'Final maintenance release of community.general major version
|
||||
2.
|
||||
|
||||
'
|
||||
fragments:
|
||||
- 2.5.9.yml
|
||||
release_date: '2022-05-16'
|
||||
|
||||
2
changelogs/fragments/simplified-bsd-license.yml
Normal file
2
changelogs/fragments/simplified-bsd-license.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Include ``simplified_bsd.txt`` license file for various module utils, the ``lxca_common`` docs fragment, and the ``utm_utils`` unit tests.
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 2.5.6
|
||||
version: 2.5.9
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -94,6 +94,7 @@ ansible.cfg: |
|
||||
|
||||
import os
|
||||
import json
|
||||
from ansible import context
|
||||
import socket
|
||||
import uuid
|
||||
import logging
|
||||
@@ -152,11 +153,11 @@ class CallbackModule(CallbackBase):
|
||||
self.base_data['ansible_pre_command_output'] = os.popen(
|
||||
self.ls_pre_command).read()
|
||||
|
||||
if self._options is not None:
|
||||
self.base_data['ansible_checkmode'] = self._options.check
|
||||
self.base_data['ansible_tags'] = self._options.tags
|
||||
self.base_data['ansible_skip_tags'] = self._options.skip_tags
|
||||
self.base_data['inventory'] = self._options.inventory
|
||||
if context.CLIARGS is not None:
|
||||
self.base_data['ansible_checkmode'] = context.CLIARGS.get('check')
|
||||
self.base_data['ansible_tags'] = context.CLIARGS.get('tags')
|
||||
self.base_data['ansible_skip_tags'] = context.CLIARGS.get('skip_tags')
|
||||
self.base_data['inventory'] = context.CLIARGS.get('inventory')
|
||||
|
||||
def set_options(self, task_keys=None, var_options=None, direct=None):
|
||||
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
|
||||
|
||||
@@ -42,28 +42,29 @@ def should_use_block(value):
|
||||
return False
|
||||
|
||||
|
||||
def my_represent_scalar(self, tag, value, style=None):
|
||||
"""Uses block style for multi-line strings"""
|
||||
if style is None:
|
||||
if should_use_block(value):
|
||||
style = '|'
|
||||
# we care more about readable than accuracy, so...
|
||||
# ...no trailing space
|
||||
value = value.rstrip()
|
||||
# ...and non-printable characters
|
||||
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
|
||||
# ...tabs prevent blocks from expanding
|
||||
value = value.expandtabs()
|
||||
# ...and odd bits of whitespace
|
||||
value = re.sub(r'[\x0b\x0c\r]', '', value)
|
||||
# ...as does trailing space
|
||||
value = re.sub(r' +\n', '\n', value)
|
||||
else:
|
||||
style = self.default_style
|
||||
node = yaml.representer.ScalarNode(tag, value, style=style)
|
||||
if self.alias_key is not None:
|
||||
self.represented_objects[self.alias_key] = node
|
||||
return node
|
||||
class MyDumper(AnsibleDumper):
|
||||
def represent_scalar(self, tag, value, style=None):
|
||||
"""Uses block style for multi-line strings"""
|
||||
if style is None:
|
||||
if should_use_block(value):
|
||||
style = '|'
|
||||
# we care more about readable than accuracy, so...
|
||||
# ...no trailing space
|
||||
value = value.rstrip()
|
||||
# ...and non-printable characters
|
||||
value = ''.join(x for x in value if x in string.printable or ord(x) >= 0xA0)
|
||||
# ...tabs prevent blocks from expanding
|
||||
value = value.expandtabs()
|
||||
# ...and odd bits of whitespace
|
||||
value = re.sub(r'[\x0b\x0c\r]', '', value)
|
||||
# ...as does trailing space
|
||||
value = re.sub(r' +\n', '\n', value)
|
||||
else:
|
||||
style = self.default_style
|
||||
node = yaml.representer.ScalarNode(tag, value, style=style)
|
||||
if self.alias_key is not None:
|
||||
self.represented_objects[self.alias_key] = node
|
||||
return node
|
||||
|
||||
|
||||
class CallbackModule(Default):
|
||||
@@ -79,7 +80,6 @@ class CallbackModule(Default):
|
||||
|
||||
def __init__(self):
|
||||
super(CallbackModule, self).__init__()
|
||||
yaml.representer.BaseRepresenter.represent_scalar = my_represent_scalar
|
||||
|
||||
def _dump_results(self, result, indent=None, sort_keys=True, keep_invocation=False):
|
||||
if result.get('_ansible_no_log', False):
|
||||
@@ -121,7 +121,7 @@ class CallbackModule(Default):
|
||||
|
||||
if abridged_result:
|
||||
dumped += '\n'
|
||||
dumped += to_text(yaml.dump(abridged_result, allow_unicode=True, width=1000, Dumper=AnsibleDumper, default_flow_style=False))
|
||||
dumped += to_text(yaml.dump(abridged_result, allow_unicode=True, width=1000, Dumper=MyDumper, default_flow_style=False))
|
||||
|
||||
# indent by a couple of spaces
|
||||
dumped = '\n '.join(dumped.split('\n')).rstrip()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,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
|
||||
|
||||
@@ -6,7 +6,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,5 +1,5 @@
|
||||
# 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,5 +1,5 @@
|
||||
# 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)
|
||||
|
||||
@@ -1,7 +1,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
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,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
|
||||
|
||||
@@ -6,7 +6,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
|
||||
|
||||
@@ -7,7 +7,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
|
||||
|
||||
@@ -6,7 +6,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
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# (c) 2018 Red Hat 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
|
||||
|
||||
@@ -4,7 +4,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
|
||||
|
||||
@@ -6,7 +6,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,4 +1,4 @@
|
||||
# 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 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -6,7 +6,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
|
||||
|
||||
@@ -2740,7 +2740,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:
|
||||
@@ -2754,7 +2756,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:
|
||||
|
||||
@@ -6,7 +6,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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Version 1.3
|
||||
# Copyright (C) 2019 Dell Inc. or its subsidiaries. All Rights Reserved.
|
||||
#
|
||||
# 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 @@
|
||||
# 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
|
||||
|
||||
@@ -6,7 +6,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,5 +1,5 @@
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -157,7 +157,7 @@ def _run_xattr(module, cmd, check_rc=True):
|
||||
if line.startswith('#') or line == '':
|
||||
pass
|
||||
elif '=' in line:
|
||||
(key, val) = line.split('=')
|
||||
(key, val) = line.split('=', 1)
|
||||
result[key] = val.strip('"')
|
||||
else:
|
||||
result[line] = ''
|
||||
|
||||
@@ -84,13 +84,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
|
||||
|
||||
@@ -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 = '''
|
||||
|
||||
@@ -168,7 +168,9 @@ EXAMPLES = '''
|
||||
password: "{{ password }}"
|
||||
resource_uri: "/redfish/v1/Managers/1/NetworkProtocol/Oem/Lenovo/DNS"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.data }}"
|
||||
|
||||
- name: Get Lenovo FoD key collection resource via GetCollectionResource command
|
||||
@@ -180,7 +182,9 @@ EXAMPLES = '''
|
||||
password: "{{ password }}"
|
||||
resource_uri: "/redfish/v1/Managers/1/Oem/Lenovo/FoD/Keys"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.data_list }}"
|
||||
|
||||
- name: Update ComputeSystem property AssetTag via PatchResource command
|
||||
|
||||
@@ -46,7 +46,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
|
||||
@@ -61,7 +63,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
|
||||
@@ -73,7 +77,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
|
||||
@@ -87,9 +93,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -49,7 +49,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
|
||||
@@ -66,7 +68,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
|
||||
@@ -79,7 +83,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
|
||||
@@ -96,13 +102,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
|
||||
@@ -124,9 +138,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -43,7 +43,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
|
||||
@@ -57,7 +58,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
|
||||
@@ -67,7 +69,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
|
||||
@@ -80,9 +83,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -38,7 +38,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
|
||||
@@ -51,7 +52,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
|
||||
@@ -61,7 +64,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -37,7 +37,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
|
||||
@@ -51,7 +52,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
|
||||
@@ -61,7 +63,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -42,7 +42,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
|
||||
@@ -60,7 +61,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
|
||||
@@ -74,7 +76,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -50,10 +50,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
|
||||
@@ -68,7 +69,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
|
||||
@@ -83,7 +85,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
|
||||
@@ -97,7 +100,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
|
||||
@@ -113,7 +117,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -45,7 +45,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
|
||||
@@ -59,7 +60,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
|
||||
@@ -69,7 +71,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 }}"
|
||||
'''
|
||||
|
||||
|
||||
@@ -67,7 +67,9 @@ EXAMPLES = '''
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.cpu.entries | to_nice_json }}"
|
||||
|
||||
- name: Get CPU model
|
||||
@@ -78,7 +80,9 @@ EXAMPLES = '''
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.cpu.entries.0.Model }}"
|
||||
|
||||
- name: Get memory inventory
|
||||
@@ -108,7 +112,9 @@ EXAMPLES = '''
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.virtual_media.entries | to_nice_json }}"
|
||||
|
||||
- name: Get Volume Inventory
|
||||
@@ -119,7 +125,8 @@ EXAMPLES = '''
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.volume.entries | to_nice_json }}"
|
||||
|
||||
- name: Get Session information
|
||||
@@ -130,7 +137,9 @@ EXAMPLES = '''
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.session.entries | to_nice_json }}"
|
||||
|
||||
- name: Get default inventory information
|
||||
@@ -139,7 +148,8 @@ EXAMPLES = '''
|
||||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- ansible.builtin.debug:
|
||||
- name: Print fetched information
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts | to_nice_json }}"
|
||||
|
||||
- name: Get several inventories
|
||||
|
||||
@@ -96,7 +96,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/
|
||||
|
||||
@@ -204,7 +204,7 @@ class GitLabDeployKey(object):
|
||||
@param key_title Title of the key
|
||||
'''
|
||||
def findDeployKey(self, project, key_title):
|
||||
deployKeys = project.keys.list()
|
||||
deployKeys = project.keys.list(all=True)
|
||||
for deployKey in deployKeys:
|
||||
if (deployKey.title == key_title):
|
||||
return deployKey
|
||||
|
||||
@@ -102,9 +102,13 @@ class GitLabGroup(object):
|
||||
|
||||
# get group id if group exists
|
||||
def get_group_id(self, gitlab_group):
|
||||
group_exists = self._gitlab.groups.list(search=gitlab_group)
|
||||
if group_exists:
|
||||
return group_exists[0].id
|
||||
groups = self._gitlab.groups.list(search=gitlab_group)
|
||||
for group in groups:
|
||||
if group.full_path == gitlab_group:
|
||||
return group.id
|
||||
for group in groups:
|
||||
if group.path == gitlab_group or group.name == gitlab_group:
|
||||
return group.id
|
||||
|
||||
# get all members in a group
|
||||
def get_members_in_a_group(self, gitlab_group_id):
|
||||
|
||||
@@ -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:
|
||||
@@ -118,9 +118,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)
|
||||
|
||||
@@ -86,7 +86,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
|
||||
|
||||
@@ -142,7 +142,7 @@ def main():
|
||||
# Clean up old failed deployment
|
||||
os.remove(os.path.join(deploy_path, "%s.failed" % deployment))
|
||||
|
||||
shutil.copyfile(src, os.path.join(deploy_path, deployment))
|
||||
module.preserved_copy(src, os.path.join(deploy_path, deployment))
|
||||
while not deployed:
|
||||
deployed = is_deployed(deploy_path, deployment)
|
||||
if is_failed(deploy_path, deployment):
|
||||
@@ -153,7 +153,7 @@ def main():
|
||||
if state == 'present' and deployed:
|
||||
if module.sha1(src) != module.sha1(os.path.join(deploy_path, deployment)):
|
||||
os.remove(os.path.join(deploy_path, "%s.deployed" % deployment))
|
||||
shutil.copyfile(src, os.path.join(deploy_path, deployment))
|
||||
module.preserved_copy(src, os.path.join(deploy_path, deployment))
|
||||
deployed = False
|
||||
while not deployed:
|
||||
deployed = is_deployed(deploy_path, deployment)
|
||||
|
||||
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.
|
||||
|
||||
@@ -2,3 +2,4 @@ needs/root
|
||||
shippable/posix/group2
|
||||
destructive
|
||||
skip/aix
|
||||
skip/osx # FIXME
|
||||
|
||||
@@ -58,3 +58,40 @@
|
||||
"PLAY RECAP *********************************************************************",
|
||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||
]
|
||||
- name: Test to_yaml
|
||||
environment:
|
||||
ANSIBLE_NOCOLOR: 'true'
|
||||
ANSIBLE_FORCE_COLOR: 'false'
|
||||
ANSIBLE_STDOUT_CALLBACK: community.general.yaml
|
||||
playbook: |
|
||||
- hosts: testhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
data: |
|
||||
line 1
|
||||
line 2
|
||||
line 3
|
||||
tasks:
|
||||
- name: Test to_yaml
|
||||
debug:
|
||||
msg: "{{ '{{' }}'{{ '{{' }}'{{ '}}' }} data | to_yaml {{ '{{' }}'{{ '}}' }}'{{ '}}' }}"
|
||||
# The above should be: msg: "{{ data | to_yaml }}"
|
||||
# Unfortunately, the way Ansible handles templating, we need to do some funny 'escaping' tricks...
|
||||
expected_output: [
|
||||
"",
|
||||
"PLAY [testhost] ****************************************************************",
|
||||
"",
|
||||
"TASK [Test to_yaml] ************************************************************",
|
||||
"ok: [testhost] => ",
|
||||
" msg: |-",
|
||||
" 'line 1",
|
||||
" ",
|
||||
" line 2",
|
||||
" ",
|
||||
" line 3",
|
||||
" ",
|
||||
" '",
|
||||
"",
|
||||
"PLAY RECAP *********************************************************************",
|
||||
"testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 "
|
||||
]
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
- 'uuid3.stdout == uuid4.stdout' # unchanged
|
||||
|
||||
- when:
|
||||
- (grow | bool and (fstype != "vfat" or resize_vfat)) or
|
||||
- ((grow | bool and (fstype != "vfat" or resize_vfat)) or
|
||||
(fstype == "xfs" and ansible_system == "Linux" and
|
||||
ansible_distribution not in ["CentOS", "Ubuntu"])
|
||||
ansible_distribution not in ["CentOS", "Ubuntu", "openSUSE Leap"]))
|
||||
block:
|
||||
- name: Check that resizefs does nothing if device size is not changed
|
||||
filesystem:
|
||||
|
||||
@@ -32,54 +32,66 @@
|
||||
# that:
|
||||
# - upgrade_option_result.changed
|
||||
|
||||
- name: Install xz package using homebrew
|
||||
homebrew:
|
||||
name: xz
|
||||
state: present
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
- vars:
|
||||
package_name: gnu-tar
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- xz_result.changed
|
||||
block:
|
||||
- name: Make sure {{ package_name }} package is not installed
|
||||
homebrew:
|
||||
name: "{{ package_name }}"
|
||||
state: absent
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
|
||||
- name: Again install xz package using homebrew
|
||||
homebrew:
|
||||
name: xz
|
||||
state: present
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
- name: Install {{ package_name }} package using homebrew
|
||||
homebrew:
|
||||
name: "{{ package_name }}"
|
||||
state: present
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: package_result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- not xz_result.changed
|
||||
- assert:
|
||||
that:
|
||||
- package_result.changed
|
||||
|
||||
- name: Uninstall xz package using homebrew
|
||||
homebrew:
|
||||
name: xz
|
||||
state: absent
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
- name: Again install {{ package_name }} package using homebrew
|
||||
homebrew:
|
||||
name: "{{ package_name }}"
|
||||
state: present
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: package_result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- xz_result.changed
|
||||
- assert:
|
||||
that:
|
||||
- not package_result.changed
|
||||
|
||||
- name: Again uninstall xz package using homebrew
|
||||
homebrew:
|
||||
name: xz
|
||||
state: absent
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
- name: Uninstall {{ package_name }} package using homebrew
|
||||
homebrew:
|
||||
name: "{{ package_name }}"
|
||||
state: absent
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: package_result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- not xz_result.changed
|
||||
- assert:
|
||||
that:
|
||||
- package_result.changed
|
||||
|
||||
- name: Again uninstall {{ package_name }} package using homebrew
|
||||
homebrew:
|
||||
name: "{{ package_name }}"
|
||||
state: absent
|
||||
update_homebrew: no
|
||||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: package_result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- not package_result.changed
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
shippable/posix/group1
|
||||
destructive
|
||||
skip/aix
|
||||
skip/osx # FIXME
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -18,7 +18,7 @@ redis_bin:
|
||||
CentOS: /usr/bin/redis-server
|
||||
FreeBSD: /usr/local/bin/redis-server
|
||||
|
||||
redis_module: "{{ (ansible_python_version is version('2.7', '>=')) | ternary('redis', 'redis==2.10.6') }}"
|
||||
redis_module: redis
|
||||
|
||||
redis_password: PASS
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
dependencies:
|
||||
- setup_pkg_mgr
|
||||
- setup_remote_constraints
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
- name: Install redis module
|
||||
pip:
|
||||
name: "{{ redis_module }}"
|
||||
extra_args: "-c {{ remote_constraints }}"
|
||||
state: present
|
||||
notify: cleanup redis
|
||||
|
||||
|
||||
@@ -419,35 +419,35 @@
|
||||
- zypper_result_update_cache_check is successful
|
||||
- zypper_result_update_cache_check is not changed
|
||||
|
||||
- name: ensure no previous netcat package still exists
|
||||
zypper:
|
||||
name:
|
||||
- netcat-openbsd
|
||||
- gnu-netcat
|
||||
state: absent
|
||||
|
||||
- name: install netcat-openbsd which conflicts with gnu-netcat
|
||||
zypper:
|
||||
name: netcat-openbsd
|
||||
state: present
|
||||
|
||||
- name: try installation of gnu-netcat which should fail due to the conflict
|
||||
zypper:
|
||||
name: gnu-netcat
|
||||
state: present
|
||||
ignore_errors: yes
|
||||
register: zypper_pkg_conflict
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- zypper_pkg_conflict is failed
|
||||
- "'conflicts with netcat-openbsd provided' in zypper_pkg_conflict.stdout"
|
||||
|
||||
- name: retry installation of gnu-netcat with force_resolution set to choose a resolution
|
||||
zypper:
|
||||
name: gnu-netcat
|
||||
state: present
|
||||
force_resolution: True
|
||||
# - name: ensure no previous netcat package still exists
|
||||
# zypper:
|
||||
# name:
|
||||
# - netcat-openbsd
|
||||
# - gnu-netcat
|
||||
# state: absent
|
||||
#
|
||||
# - name: install netcat-openbsd which conflicts with gnu-netcat
|
||||
# zypper:
|
||||
# name: netcat-openbsd
|
||||
# state: present
|
||||
#
|
||||
# - name: try installation of gnu-netcat which should fail due to the conflict
|
||||
# zypper:
|
||||
# name: gnu-netcat
|
||||
# state: present
|
||||
# ignore_errors: yes
|
||||
# register: zypper_pkg_conflict
|
||||
#
|
||||
# - assert:
|
||||
# that:
|
||||
# - zypper_pkg_conflict is failed
|
||||
# - "'conflicts with netcat-openbsd provided' in zypper_pkg_conflict.stdout"
|
||||
#
|
||||
# - name: retry installation of gnu-netcat with force_resolution set to choose a resolution
|
||||
# zypper:
|
||||
# name: gnu-netcat
|
||||
# state: present
|
||||
# force_resolution: True
|
||||
|
||||
- name: duplicate rpms block
|
||||
vars:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
"""Check extra collection docs with antsibull-lint."""
|
||||
"""Check extra collection docs with antsibull-docs."""
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
],
|
||||
"output": "path-line-column-message",
|
||||
"requirements": [
|
||||
"antsibull"
|
||||
"antsibull-docs"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
"""Check extra collection docs with antsibull-lint."""
|
||||
"""Check extra collection docs with antsibull-docs."""
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
@@ -14,7 +14,7 @@ def main():
|
||||
"""Main entry point."""
|
||||
if not os.path.isdir(os.path.join('docs', 'docsite')):
|
||||
return
|
||||
p = subprocess.run(['antsibull-lint', 'collection-docs', '.'], check=False)
|
||||
p = subprocess.run(['antsibull-docs', 'lint-collection-docs', '.'], check=False)
|
||||
if p.returncode not in (0, 3):
|
||||
print('{0}:0:0: unexpected return code {1}'.format(sys.argv[0], p.returncode))
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
.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/module_utils/compat/ipaddress.py no-assert
|
||||
plugins/module_utils/compat/ipaddress.py no-unicode-literals
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
.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/compat/ipaddress.py no-assert
|
||||
plugins/module_utils/compat/ipaddress.py no-unicode-literals
|
||||
plugins/modules/cloud/linode/linode.py validate-modules:parameter-list-no-elements
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
.azure-pipelines/scripts/publish-codecov.py replace-urlopen
|
||||
plugins/module_utils/compat/ipaddress.py no-assert
|
||||
plugins/module_utils/compat/ipaddress.py no-unicode-literals
|
||||
plugins/modules/cloud/linode/linode.py validate-modules:parameter-list-no-elements
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
.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/module_utils/compat/ipaddress.py no-assert
|
||||
plugins/module_utils/compat/ipaddress.py no-unicode-literals
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ PyGithub
|
||||
httmock
|
||||
|
||||
# requirement for maven_artifact module
|
||||
lxml
|
||||
lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7 or later
|
||||
lxml ; python_version >= '2.7'
|
||||
semantic_version
|
||||
|
||||
# requirement for datadog_downtime module
|
||||
|
||||
@@ -29,6 +29,7 @@ openshift >= 0.6.2, < 0.9.0 # merge_type support
|
||||
virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later require python 2.7 or later
|
||||
pathspec < 0.6.0 ; python_version < '2.7' # pathspec 0.6.0 and later require python 2.7 or later
|
||||
pyopenssl < 18.0.0 ; python_version < '2.7' # pyOpenSSL 18.0.0 and later require python 2.7 or later
|
||||
pyopenssl < 22.0.0 ; python_version >= '2.7' and python_version < '3.6' # pyOpenSSL 22.0.0 and later require python 3.6 or later
|
||||
pyfmg == 0.6.1 # newer versions do not pass current unit tests
|
||||
pyyaml < 5.1 ; python_version < '2.7' # pyyaml 5.1 and later require python 2.7 or later
|
||||
pycparser < 2.19 ; python_version < '2.7' # pycparser 2.19 and later require python 2.7 or later
|
||||
@@ -43,6 +44,9 @@ botocore >= 1.10.0, < 1.14 ; python_version < '2.7' # adds support for the follo
|
||||
botocore >= 1.10.0 ; python_version >= '2.7' # adds support for the following AWS services: secretsmanager, fms, and acm-pca
|
||||
setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later
|
||||
cffi >= 1.14.2, != 1.14.3 # Yanked version which older versions of pip will still install:
|
||||
redis == 2.10.6 ; python_version < '2.7'
|
||||
redis < 4.0.0 ; python_version >= '2.7' and python_version < '3.6'
|
||||
redis ; python_version >= '3.6'
|
||||
|
||||
# freeze pylint and its requirements for consistent test results
|
||||
astroid == 2.2.5
|
||||
|
||||
@@ -17,6 +17,10 @@ fi
|
||||
stage="${S:-prod}"
|
||||
provider="${P:-default}"
|
||||
|
||||
if [ "${platform}" == "rhel" ] && [[ "${version}" =~ ^8 ]]; then
|
||||
echo "pynacl >= 1.4.0, < 1.5.0; python_version == '3.6'" >> tests/utils/constraints.txt
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
|
||||
--remote "${platform}/${version}" --remote-terminate always --remote-stage "${stage}" --remote-provider "${provider}"
|
||||
|
||||
@@ -50,7 +50,7 @@ function retry
|
||||
echo "@* -> ${result}"
|
||||
done
|
||||
echo "Command '@*' failed 3 times!"
|
||||
exit -1
|
||||
exit 255
|
||||
}
|
||||
|
||||
command -v pip
|
||||
@@ -86,10 +86,14 @@ if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then
|
||||
# retry ansible-galaxy -vvv collection install community.internal_test_tools
|
||||
fi
|
||||
|
||||
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; then
|
||||
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ] && [ "${test}" != "sanity/extra" ]; then
|
||||
CRYPTO_BRANCH=main
|
||||
if [ "${script}" == "linux" ] && [[ "${test}" =~ "ubuntu1604/" ]]; then
|
||||
CRYPTO_BRANCH=stable-1
|
||||
fi
|
||||
# To prevent Python dependencies on other collections only install other collections for integration tests
|
||||
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
|
||||
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
|
||||
retry git clone --depth=1 --branch "${CRYPTO_BRANCH}" --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
|
||||
# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
|
||||
# retry ansible-galaxy -vvv collection install ansible.posix
|
||||
# retry ansible-galaxy -vvv collection install community.crypto
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user