mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-03-26 21:33:32 +00:00
Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd8a3f35c2 | ||
|
|
edec4d767d | ||
|
|
0a56fb0e46 | ||
|
|
f3b6b5e690 | ||
|
|
d65a36e9ea | ||
|
|
252b531c20 | ||
|
|
bc88258687 | ||
|
|
1747370f30 | ||
|
|
72353d3f04 | ||
|
|
1822789d95 | ||
|
|
ccbb679fc3 | ||
|
|
98c86c54cd | ||
|
|
354239d6c9 | ||
|
|
4825036c7e | ||
|
|
360d0c3441 | ||
|
|
d8fb68514c | ||
|
|
d8c6add988 | ||
|
|
ea8fc70373 | ||
|
|
20f70caa1f | ||
|
|
04f976d7d3 | ||
|
|
b6a2dee8bb | ||
|
|
5b66052067 | ||
|
|
2655a6ffc1 | ||
|
|
bbba9beb70 | ||
|
|
a8594c5477 | ||
|
|
3043f737a0 | ||
|
|
080ae28e7d | ||
|
|
e1dad76ccb | ||
|
|
bc0fb3096b | ||
|
|
1e7d82af6d | ||
|
|
41d49e4e08 | ||
|
|
6241e09ccd | ||
|
|
679fe78f32 | ||
|
|
b8c5d6b1b7 | ||
|
|
665f84d996 | ||
|
|
c359200e80 | ||
|
|
793b039691 | ||
|
|
ef36fdc17d | ||
|
|
bcb08106d9 | ||
|
|
cbf54f214c | ||
|
|
931326fb70 | ||
|
|
6343dbdcff | ||
|
|
34a12eb3f9 | ||
|
|
402e0b1f76 | ||
|
|
1268d4aa0a | ||
|
|
5988748999 | ||
|
|
5935dce47f | ||
|
|
77df4ba3fd | ||
|
|
1e84bce91a | ||
|
|
d1fff45191 | ||
|
|
0eeaf61a1a | ||
|
|
c96be65ec9 | ||
|
|
4b0b50439d | ||
|
|
0177b87cbc | ||
|
|
079ba357d4 | ||
|
|
e5e36d3c7b | ||
|
|
f68cec59e7 | ||
|
|
402ec20076 | ||
|
|
2dfa6e28a1 | ||
|
|
c390183337 | ||
|
|
06efaeb108 | ||
|
|
12e0c72841 | ||
|
|
8d568fb6ea | ||
|
|
210ed7c147 | ||
|
|
dd249846ec | ||
|
|
53bb7312e4 | ||
|
|
32350028b6 | ||
|
|
85b43f9059 | ||
|
|
d944df3bde | ||
|
|
be61219931 | ||
|
|
4aba0d1e93 |
3
.azure-pipelines/README.md
Normal file
3
.azure-pipelines/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## Azure Pipelines Configuration
|
||||
|
||||
Please see the [Documentation](https://github.com/ansible/community/wiki/Testing:-Azure-Pipelines) for more information.
|
||||
193
.azure-pipelines/azure-pipelines.yml
Normal file
193
.azure-pipelines/azure-pipelines.yml
Normal file
@@ -0,0 +1,193 @@
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
schedules:
|
||||
- cron: 0 9 * * *
|
||||
displayName: Nightly
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
variables:
|
||||
- name: checkoutPath
|
||||
value: ansible_collections/ansible/posix
|
||||
- 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.8.0
|
||||
|
||||
pool: Standard
|
||||
|
||||
stages:
|
||||
|
||||
## Docker
|
||||
- stage: Docker_devel
|
||||
displayName: Docker devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: devel/linux/{0}/1
|
||||
targets:
|
||||
- name: CentOS 6
|
||||
test: centos6
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 32
|
||||
test: fedora32
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: openSUSE 15 py2
|
||||
test: opensuse15py2
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
- name: Ubuntu 18.04
|
||||
test: ubuntu1804
|
||||
- name: Ubuntu 20.04
|
||||
test: ubuntu2004
|
||||
- stage: Docker_2_10
|
||||
displayName: Docker 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.10/linux/{0}/1
|
||||
targets:
|
||||
- name: CentOS 6
|
||||
test: centos6
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 30
|
||||
test: fedora30
|
||||
- name: Fedora 31
|
||||
test: fedora31
|
||||
- name: openSUSE 15 py2
|
||||
test: opensuse15py2
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
- name: Ubuntu 16.04
|
||||
test: ubuntu1604
|
||||
- name: Ubuntu 18.04
|
||||
test: ubuntu1804
|
||||
- stage: Docker_2_9
|
||||
displayName: Docker 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.9/linux/{0}/1
|
||||
targets:
|
||||
- name: CentOS 6
|
||||
test: centos6
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: CentOS 8
|
||||
test: centos8
|
||||
- name: Fedora 30
|
||||
test: fedora30
|
||||
- name: Fedora 31
|
||||
test: fedora31
|
||||
- name: openSUSE 15 py2
|
||||
test: opensuse15py2
|
||||
- name: openSUSE 15 py3
|
||||
test: opensuse15
|
||||
- name: Ubuntu 16.04
|
||||
test: ubuntu1604
|
||||
- name: Ubuntu 18.04
|
||||
test: ubuntu1804
|
||||
|
||||
## Remote
|
||||
- stage: Remote_devel
|
||||
displayName: Remote devel
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: devel/{0}/1
|
||||
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 11.4
|
||||
test: freebsd/11.4
|
||||
- name: FreeBSD 12.2
|
||||
test: freebsd/12.2
|
||||
- stage: Remote_2_10
|
||||
displayName: Remote 2.10
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.10/{0}/1
|
||||
targets:
|
||||
- name: OS X 10.11
|
||||
test: osx/10.11
|
||||
- name: RHEL 7.6
|
||||
test: rhel/7.6
|
||||
- name: RHEL 8.2
|
||||
test: rhel/8.2
|
||||
- name: FreeBSD 11.1
|
||||
test: freebsd/11.1
|
||||
- name: FreeBSD 12.1
|
||||
test: freebsd/12.1
|
||||
|
||||
- stage: Remote_2_9
|
||||
displayName: Remote 2.9
|
||||
dependsOn: []
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
testFormat: 2.9/{0}/1
|
||||
targets:
|
||||
- name: OS X 10.11
|
||||
test: osx/10.11
|
||||
- name: RHEL 7.6
|
||||
test: rhel/7.6
|
||||
- name: RHEL 8.1
|
||||
test: rhel/8.1
|
||||
- name: FreeBSD 11.1
|
||||
test: freebsd/11.1
|
||||
- name: FreeBSD 12.0
|
||||
test: freebsd/12.0
|
||||
## Finally
|
||||
|
||||
- stage: Summary
|
||||
condition: succeededOrFailed()
|
||||
dependsOn:
|
||||
- Remote_2_9
|
||||
- Docker_2_9
|
||||
- Remote_2_10
|
||||
- Docker_2_10
|
||||
- Remote_devel
|
||||
- Docker_devel
|
||||
jobs:
|
||||
- template: templates/coverage.yml
|
||||
20
.azure-pipelines/scripts/aggregate-coverage.sh
Executable file
20
.azure-pipelines/scripts/aggregate-coverage.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/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
|
||||
60
.azure-pipelines/scripts/combine-coverage.py
Executable file
60
.azure-pipelines/scripts/combine-coverage.py
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/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()
|
||||
24
.azure-pipelines/scripts/process-results.sh
Executable file
24
.azure-pipelines/scripts/process-results.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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
|
||||
27
.azure-pipelines/scripts/publish-codecov.sh
Executable file
27
.azure-pipelines/scripts/publish-codecov.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/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://codecov.io/bash > 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
|
||||
15
.azure-pipelines/scripts/report-coverage.sh
Executable file
15
.azure-pipelines/scripts/report-coverage.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/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
|
||||
34
.azure-pipelines/scripts/run-tests.sh
Executable file
34
.azure-pipelines/scripts/run-tests.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/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"
|
||||
25
.azure-pipelines/scripts/time-command.py
Executable file
25
.azure-pipelines/scripts/time-command.py
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/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()
|
||||
39
.azure-pipelines/templates/coverage.yml
Normal file
39
.azure-pipelines/templates/coverage.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
# 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
|
||||
55
.azure-pipelines/templates/matrix.yml
Normal file
55
.azure-pipelines/templates/matrix.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
# 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) }}
|
||||
45
.azure-pipelines/templates/test.yml
Normal file
45
.azure-pipelines/templates/test.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
# 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)"
|
||||
104
CHANGELOG.rst
Normal file
104
CHANGELOG.rst
Normal file
@@ -0,0 +1,104 @@
|
||||
===========================
|
||||
ansible.posix Release Notes
|
||||
===========================
|
||||
|
||||
.. contents:: Topics
|
||||
|
||||
|
||||
v1.2.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
This is the minor release of the ``ansible.posix`` collection.
|
||||
This changelog contains all changes to the modules in this collection that
|
||||
have been added after the release of ``ansible.posix`` 1.1.0.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- firewalld - bring the ``target`` feature back (https://github.com/ansible-collections/ansible.posix/issues/112).
|
||||
- fix sanity test for various modules.
|
||||
- synchronize - add the ``ssh_connection_multiplexing`` option to allow SSH connection multiplexing (https://github.com/ansible/ansible/issues/24365).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- at - add AIX support (https://github.com/ansible-collections/ansible.posix/pull/99).
|
||||
- synchronize - fix for private_key overriding in synchronize module.
|
||||
- synchronize - add ``community.docker.docker`` to the list of supported transports (https://github.com/ansible-collections/ansible.posix/issues/132).
|
||||
- synchronize - do not prepend PWD when path is in form user@server:path or server:path (https://github.com/ansible-collections/ansible.posix/pull/118).
|
||||
- sysctl - do not persist sysctl when value is invalid (https://github.com/ansible-collections/ansible.posix/pull/101).
|
||||
|
||||
v1.1.1
|
||||
======
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- skippy - fixed the deprecation warning (by date) for skippy callback plugin
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Fix synchronize to work with renamed docker and buildah connection plugins.
|
||||
|
||||
v1.1.0
|
||||
======
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- firewalld - add firewalld module to ansible.posix collection
|
||||
|
||||
v1.0.0
|
||||
======
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- Bootstrap Collection (https://github.com/ansible-collections/ansible.posix/pull/1).
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- CI should use devel (https://github.com/ansible-collections/ansible.posix/pull/6).
|
||||
- Enable tests for at, patch and synchronize modules (https://github.com/ansible-collections/ansible.posix/pull/5).
|
||||
- Enabled tags in galaxy.yml (https://github.com/ansible-collections/ansible.posix/issues/18).
|
||||
- Migrate hacking/cgroup_perf_recap_graph.py to this collection, since the cgroup_perf_recap callback lives here.
|
||||
- Remove license key from galaxy.yml.
|
||||
- Remove sanity jobs from shippable (https://github.com/ansible-collections/ansible.posix/pull/43).
|
||||
- Removed ANSIBLE_METADATA from all the modules.
|
||||
- Revert "Enable at, patch and synchronize tests (https://github.com/ansible-collections/ansible.posix/pull/5)".
|
||||
- Update EXAMPLES section in modules to use FQCN.
|
||||
- Update README.md (https://github.com/ansible-collections/ansible.posix/pull/4/).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Allow unsetting existing environment vars via environment by specifying a null value (https://github.com/ansible/ansible/pull/68236).
|
||||
- Mount - Handle remount with new options (https://github.com/ansible/ansible/issues/59460).
|
||||
- Profile_tasks - result was a odict_items which is not subscriptable, so the slicing was failing (https://github.com/ansible/ansible/issues/59059).
|
||||
- Revert "mount - Check if src exists before mounted (ansible/ansible#61752)".
|
||||
- Typecast results before use in profile_tasks callback (https://github.com/ansible/ansible/issues/69563).
|
||||
- authorized_keys - Added FIDO2 security keys (https://github.com/ansible-collections/ansible.posix/issues/17).
|
||||
- authorized_keys - fix inconsistent return value for check mode (https://github.com/ansible-collections/ansible.posix/issues/37)
|
||||
- json callback - Fix host result to task references in the resultant JSON output for non-lockstep strategy plugins such as free (https://github.com/ansible/ansible/issues/65931)
|
||||
- mount - fix issues with ismount module_util pathing for Ansible 2.9 (fixes https://github.com/ansible-collections/ansible.posix/issues/21)
|
||||
- patch - fix FQCN usage for action plugin (https://github.com/ansible-collections/ansible.posix/issues/11)
|
||||
- selinux - add missing configuration keys for /etc/selinux/config (https://github.com/ansible-collections/ansible.posix/issues/23)
|
||||
- synchronize - fix FQCN usage for action plugin (https://github.com/ansible-collections/ansible.posix/issues/11)
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- acl - Set and retrieve file ACL information.
|
||||
- at - Schedule the execution of a command or script file via the at command
|
||||
- authorized_key - Adds or removes an SSH authorized key
|
||||
- mount - Control active and configured mount points
|
||||
- patch - Apply patch files using the GNU patch tool
|
||||
- seboolean - Toggles SELinux booleans
|
||||
- selinux - Change policy and state of SELinux
|
||||
- synchronize - A wrapper around rsync to make common tasks in your playbooks quick and easy
|
||||
- sysctl - Manage entries in sysctl.conf.
|
||||
26
README.md
26
README.md
@@ -1,5 +1,7 @@
|
||||
# ansible.posix
|
||||
<!-- Add CI and code coverage badges here. Samples included below. -->
|
||||
[](https://dev.azure.com/ansible/ansible.posix/_build?definitionId=26)
|
||||
[]() <!--[](https://codecov.io/gh/ansible-collections/ansible.posix)-->
|
||||
|
||||
<!-- Describe the collection and why a user would want to use it. What does the collection do? -->
|
||||
@@ -9,7 +11,7 @@ An Ansible Collection of modules and plugins that target POSIX UNIX/Linux and de
|
||||
<!--start requires_ansible-->
|
||||
## Ansible version compatibility
|
||||
|
||||
This collection has been tested against following Ansible versions: **>=2.9,<2.11**.
|
||||
This collection has been tested against following Ansible versions: **>=2.9**.
|
||||
|
||||
Plugins and modules within a collection may be tested with only specific Ansible versions.
|
||||
A collection may contain metadata that identifies these versions.
|
||||
@@ -22,16 +24,16 @@ PEP440 is the schema used to describe the versions of Ansible.
|
||||
### Modules
|
||||
Name | Description
|
||||
--- | ---
|
||||
[ansible.posix.acl](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.acl_module.rst)|Set and retrieve file ACL information.
|
||||
[ansible.posix.at](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.at_module.rst)|Schedule the execution of a command or script file via the at command
|
||||
[ansible.posix.authorized_key](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.authorized_key_module.rst)|Adds or removes an SSH authorized key
|
||||
[ansible.posix.firewalld](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.firewalld_module.rst)|Manage arbitrary ports/services with firewalld
|
||||
[ansible.posix.mount](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.mount_module.rst)|Control active and configured mount points
|
||||
[ansible.posix.patch](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.patch_module.rst)|Apply patch files using the GNU patch tool
|
||||
[ansible.posix.seboolean](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.seboolean_module.rst)|Toggles SELinux booleans
|
||||
[ansible.posix.selinux](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.selinux_module.rst)|Change policy and state of SELinux
|
||||
[ansible.posix.synchronize](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.synchronize_module.rst)|A wrapper around rsync to make common tasks in your playbooks quick and easy
|
||||
[ansible.posix.sysctl](https://github.com/ansible-collections/ansible.posix/blob/master/docs/ansible.posix.sysctl_module.rst)|Manage entries in sysctl.conf.
|
||||
[ansible.posix.acl](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.acl_module.rst)|Set and retrieve file ACL information.
|
||||
[ansible.posix.at](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.at_module.rst)|Schedule the execution of a command or script file via the at command
|
||||
[ansible.posix.authorized_key](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.authorized_key_module.rst)|Adds or removes an SSH authorized key
|
||||
[ansible.posix.firewalld](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.firewalld_module.rst)|Manage arbitrary ports/services with firewalld
|
||||
[ansible.posix.mount](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.mount_module.rst)|Control active and configured mount points
|
||||
[ansible.posix.patch](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.patch_module.rst)|Apply patch files using the GNU patch tool
|
||||
[ansible.posix.seboolean](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.seboolean_module.rst)|Toggles SELinux booleans
|
||||
[ansible.posix.selinux](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.selinux_module.rst)|Change policy and state of SELinux
|
||||
[ansible.posix.synchronize](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.synchronize_module.rst)|A wrapper around rsync to make common tasks in your playbooks quick and easy
|
||||
[ansible.posix.sysctl](https://github.com/ansible-collections/ansible.posix/blob/main/docs/ansible.posix.sysctl_module.rst)|Manage entries in sysctl.conf.
|
||||
|
||||
<!--end collection content-->
|
||||
|
||||
@@ -106,4 +108,4 @@ None
|
||||
|
||||
GNU General Public License v3.0 or later.
|
||||
|
||||
See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
|
||||
See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
|
||||
|
||||
136
changelogs/changelog.yaml
Normal file
136
changelogs/changelog.yaml
Normal file
@@ -0,0 +1,136 @@
|
||||
ancestor: null
|
||||
releases:
|
||||
1.0.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Allow unsetting existing environment vars via environment by specifying a
|
||||
null value (https://github.com/ansible/ansible/pull/68236).
|
||||
- Mount - Handle remount with new options (https://github.com/ansible/ansible/issues/59460).
|
||||
- Profile_tasks - result was a odict_items which is not subscriptable, so the
|
||||
slicing was failing (https://github.com/ansible/ansible/issues/59059).
|
||||
- Revert "mount - Check if src exists before mounted (ansible/ansible#61752)".
|
||||
- Typecast results before use in profile_tasks callback (https://github.com/ansible/ansible/issues/69563).
|
||||
- authorized_keys - Added FIDO2 security keys (https://github.com/ansible-collections/ansible.posix/issues/17).
|
||||
- authorized_keys - fix inconsistent return value for check mode (https://github.com/ansible-collections/ansible.posix/issues/37)
|
||||
- json callback - Fix host result to task references in the resultant JSON output
|
||||
for non-lockstep strategy plugins such as free (https://github.com/ansible/ansible/issues/65931)
|
||||
- mount - fix issues with ismount module_util pathing for Ansible 2.9 (fixes
|
||||
https://github.com/ansible-collections/ansible.posix/issues/21)
|
||||
- patch - fix FQCN usage for action plugin (https://github.com/ansible-collections/ansible.posix/issues/11)
|
||||
- selinux - add missing configuration keys for /etc/selinux/config (https://github.com/ansible-collections/ansible.posix/issues/23)
|
||||
- synchronize - fix FQCN usage for action plugin (https://github.com/ansible-collections/ansible.posix/issues/11)
|
||||
major_changes:
|
||||
- Bootstrap Collection (https://github.com/ansible-collections/ansible.posix/pull/1).
|
||||
minor_changes:
|
||||
- CI should use devel (https://github.com/ansible-collections/ansible.posix/pull/6).
|
||||
- Enable tests for at, patch and synchronize modules (https://github.com/ansible-collections/ansible.posix/pull/5).
|
||||
- Enabled tags in galaxy.yml (https://github.com/ansible-collections/ansible.posix/issues/18).
|
||||
- Migrate hacking/cgroup_perf_recap_graph.py to this collection, since the cgroup_perf_recap
|
||||
callback lives here.
|
||||
- Remove license key from galaxy.yml.
|
||||
- Remove sanity jobs from shippable (https://github.com/ansible-collections/ansible.posix/pull/43).
|
||||
- Removed ANSIBLE_METADATA from all the modules.
|
||||
- Revert "Enable at, patch and synchronize tests (https://github.com/ansible-collections/ansible.posix/pull/5)".
|
||||
- Update EXAMPLES section in modules to use FQCN.
|
||||
- Update README.md (https://github.com/ansible-collections/ansible.posix/pull/4/).
|
||||
fragments:
|
||||
- 11-action-plugins-use-fqcn.yml
|
||||
- 12_migrate_cgroup_perf_recap_graph.yml
|
||||
- 14_mount_option.yml
|
||||
- 15_profile_tasks.yml
|
||||
- 17_authorized_keys.yml
|
||||
- 19_enable_tags.yml
|
||||
- 21-mount-module_util-routing-issue.yml
|
||||
- 23-selinux-doesnt-create-missing-config-keys.yml
|
||||
- 25_ansible_metadata.yml
|
||||
- 26_profile_tasks_doc.yml
|
||||
- 27_update_examples.yml
|
||||
- 33_mount.yml
|
||||
- 35_disable_tests.yml
|
||||
- 37-authorized_keys-inconsistent-check-mode-values.yml
|
||||
- 39_remove_license.yml
|
||||
- 43_remove_shippable.yml
|
||||
- 4_update_readme.yml
|
||||
- 5_enable_tests.yml
|
||||
- 65931-json-callback-non-lockstep-output.yml
|
||||
- 6_test_devel.yml
|
||||
- 7_env.yml
|
||||
- initial_commit.yaml
|
||||
modules:
|
||||
- description: Set and retrieve file ACL information.
|
||||
name: acl
|
||||
namespace: ''
|
||||
- description: Schedule the execution of a command or script file via the at command
|
||||
name: at
|
||||
namespace: ''
|
||||
- description: Adds or removes an SSH authorized key
|
||||
name: authorized_key
|
||||
namespace: ''
|
||||
- description: Control active and configured mount points
|
||||
name: mount
|
||||
namespace: ''
|
||||
- description: Apply patch files using the GNU patch tool
|
||||
name: patch
|
||||
namespace: ''
|
||||
- description: Toggles SELinux booleans
|
||||
name: seboolean
|
||||
namespace: ''
|
||||
- description: Change policy and state of SELinux
|
||||
name: selinux
|
||||
namespace: ''
|
||||
- description: A wrapper around rsync to make common tasks in your playbooks quick
|
||||
and easy
|
||||
name: synchronize
|
||||
namespace: ''
|
||||
- description: Manage entries in sysctl.conf.
|
||||
name: sysctl
|
||||
namespace: ''
|
||||
release_date: '2020-06-19'
|
||||
1.1.0:
|
||||
changes:
|
||||
minor_changes:
|
||||
- firewalld - add firewalld module to ansible.posix collection
|
||||
fragments:
|
||||
- firewalld_migration.yml
|
||||
release_date: '2020-07-15'
|
||||
1.1.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- Fix synchronize to work with renamed docker and buildah connection plugins.
|
||||
minor_changes:
|
||||
- skippy - fixed the deprecation warning (by date) for skippy callback plugin
|
||||
fragments:
|
||||
- 74_synchronize_docker.yml
|
||||
- skippy_deprecation.yml
|
||||
release_date: '2020-09-02'
|
||||
1.2.0:
|
||||
changes:
|
||||
bugfixes:
|
||||
- at - add AIX support (https://github.com/ansible-collections/ansible.posix/pull/99).
|
||||
- synchronize - fix for private_key overriding in synchronize module.
|
||||
- synchronize - add ``community.docker.docker`` to the list of supported transports
|
||||
(https://github.com/ansible-collections/ansible.posix/issues/132).
|
||||
- synchronize - do not prepend PWD when path is in form user@server:path or
|
||||
server:path (https://github.com/ansible-collections/ansible.posix/pull/118).
|
||||
- sysctl - do not persist sysctl when value is invalid (https://github.com/ansible-collections/ansible.posix/pull/101).
|
||||
minor_changes:
|
||||
- firewalld - bring the ``target`` feature back (https://github.com/ansible-collections/ansible.posix/issues/112).
|
||||
- fix sanity test for various modules.
|
||||
- synchronize - add the ``ssh_connection_multiplexing`` option to allow SSH
|
||||
connection multiplexing (https://github.com/ansible/ansible/issues/24365).
|
||||
release_summary: 'This is the minor release of the ``ansible.posix`` collection.
|
||||
|
||||
This changelog contains all changes to the modules in this collection that
|
||||
|
||||
have been added after the release of ``ansible.posix`` 1.1.0.'
|
||||
fragments:
|
||||
- 1.2.0.yml
|
||||
- 101-sysctl-dont-persist-when-invalid.yml
|
||||
- 118-synchronize_bugfix.yml
|
||||
- 120-synchronize_add_option.yml
|
||||
- 144_add_community_docker_connection_plugin_alias.yml
|
||||
- 82-private-key-override-fix.yml
|
||||
- 99-at_add_aix_support.yml
|
||||
- firewalld_zone_target.yml
|
||||
- misc_fix.yml
|
||||
release_date: '2021-03-08'
|
||||
4
changelogs/fragments/1.2.0.yml
Normal file
4
changelogs/fragments/1.2.0.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
release_summary: |-
|
||||
This is the minor release of the ``ansible.posix`` collection.
|
||||
This changelog contains all changes to the modules in this collection that
|
||||
have been added after the release of ``ansible.posix`` 1.1.0.
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- sysctl - do not persist sysctl when value is invalid (https://github.com/ansible-collections/ansible.posix/pull/101).
|
||||
2
changelogs/fragments/118-synchronize_bugfix.yml
Normal file
2
changelogs/fragments/118-synchronize_bugfix.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "synchronize - do not prepend PWD when path is in form user@server:path or server:path (https://github.com/ansible-collections/ansible.posix/pull/118)."
|
||||
2
changelogs/fragments/120-synchronize_add_option.yml
Normal file
2
changelogs/fragments/120-synchronize_add_option.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- synchronize - add the ``ssh_connection_multiplexing`` option to allow SSH connection multiplexing (https://github.com/ansible/ansible/issues/24365).
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
bugfixes:
|
||||
- synchronize - add ``community.docker.docker`` to the list of supported
|
||||
transports (https://github.com/ansible-collections/ansible.posix/issues/132).
|
||||
2
changelogs/fragments/74_synchronize_docker.yml
Normal file
2
changelogs/fragments/74_synchronize_docker.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Fix synchronize to work with renamed docker and buildah connection plugins.
|
||||
3
changelogs/fragments/82-private-key-override-fix.yml
Normal file
3
changelogs/fragments/82-private-key-override-fix.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- synchronize - fix for private_key overriding in synchronize module.
|
||||
2
changelogs/fragments/99-at_add_aix_support.yml
Normal file
2
changelogs/fragments/99-at_add_aix_support.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- at - add AIX support (https://github.com/ansible-collections/ansible.posix/pull/99).
|
||||
2
changelogs/fragments/firewalld_zone_target.yml
Normal file
2
changelogs/fragments/firewalld_zone_target.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- firewalld - bring the ``target`` feature back (https://github.com/ansible-collections/ansible.posix/issues/112).
|
||||
2
changelogs/fragments/misc_fix.yml
Normal file
2
changelogs/fragments/misc_fix.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- fix sanity test for various modules.
|
||||
3
changelogs/fragments/skippy_deprecation.yml
Normal file
3
changelogs/fragments/skippy_deprecation.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
minor_changes:
|
||||
- skippy - fixed the deprecation warning (by date) for skippy callback plugin
|
||||
@@ -31,217 +31,218 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>default</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If the target is a directory, setting this to <code>yes</code> will make it the default ACL for entities created inside the directory.</div>
|
||||
<div>Setting <code>default</code> to <code>yes</code> causes an error if the path is a file.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If the target is a directory, setting this to <code>yes</code> will make it the default ACL for entities created inside the directory.</div>
|
||||
<div>Setting <code>default</code> to <code>yes</code> causes an error if the path is a file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>entity</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The actual user or group that the ACL applies to when matching entity types user or group are selected.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The actual user or group that the ACL applies to when matching entity types user or group are selected.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>entry</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>DEPRECATED.</div>
|
||||
<div>The ACL to set or remove.</div>
|
||||
<div>This must always be quoted in the form of <code><etype>:<qualifier>:<perms></code>.</div>
|
||||
<div>The qualifier may be empty for some types, but the type and perms are always required.</div>
|
||||
<div><code>-</code> can be used as placeholder when you do not care about permissions.</div>
|
||||
<div>This is now superseded by entity, type and permissions fields.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>DEPRECATED.</div>
|
||||
<div>The ACL to set or remove.</div>
|
||||
<div>This must always be quoted in the form of <code><etype>:<qualifier>:<perms></code>.</div>
|
||||
<div>The qualifier may be empty for some types, but the type and perms are always required.</div>
|
||||
<div><code>-</code> can be used as placeholder when you do not care about permissions.</div>
|
||||
<div>This is now superseded by entity, type and permissions fields.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>etype</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>group</li>
|
||||
<li>mask</li>
|
||||
<li>other</li>
|
||||
<li>user</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The entity type of the ACL to apply, see <code>setfacl</code> documentation for more info.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>group</li>
|
||||
<li>mask</li>
|
||||
<li>other</li>
|
||||
<li>user</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The entity type of the ACL to apply, see <code>setfacl</code> documentation for more info.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>follow</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether to follow symlinks on the path if a symlink is encountered.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether to follow symlinks on the path if a symlink is encountered.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>path</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The full path of the file or object.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: name</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The full path of the file or object.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: name</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>permissions</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The permissions to apply/remove can be any combination of <code>r</code>, <code>w</code> and <code>x</code> (read, write and execute respectively)</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The permissions to apply/remove can be any combination of <code>r</code>, <code>w</code>, <code>x</code> (read, write and execute respectively), and <code>X</code> (execute permission if the file is a directory or already has execute permission for some user)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>recalculate_mask</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>default</b> ←</div></li>
|
||||
<li>mask</li>
|
||||
<li>no_mask</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Select if and when to recalculate the effective right masks of the files.</div>
|
||||
<div>See <code>setfacl</code> documentation for more info.</div>
|
||||
<div>Incompatible with <code>state=query</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>default</b> ←</div></li>
|
||||
<li>mask</li>
|
||||
<li>no_mask</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Select if and when to recalculate the effective right masks of the files.</div>
|
||||
<div>See <code>setfacl</code> documentation for more info.</div>
|
||||
<div>Incompatible with <code>state=query</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>recursive</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Recursively sets the specified ACL.</div>
|
||||
<div>Incompatible with <code>state=query</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Recursively sets the specified ACL.</div>
|
||||
<div>Incompatible with <code>state=query</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li>present</li>
|
||||
<li><div style="color: blue"><b>query</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Define whether the ACL should be present or not.</div>
|
||||
<div>The <code>query</code> state gets the current ACL without changing it, for use in <code>register</code> operations.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li>present</li>
|
||||
<li><div style="color: blue"><b>query</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Define whether the ACL should be present or not.</div>
|
||||
<div>The <code>query</code> state gets the current ACL without changing it, for use in <code>register</code> operations.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>use_nfsv4_acls</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Use NFSv4 ACLs instead of POSIX ACLs.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Use NFSv4 ACLs instead of POSIX ACLs.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -260,7 +261,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Grant user Joe read access to a file
|
||||
ansible.posix.acl:
|
||||
path: /etc/foo.conf
|
||||
@@ -298,7 +298,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Return Values
|
||||
-------------
|
||||
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
|
||||
@@ -311,24 +310,24 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
|
||||
<th>Returned</th>
|
||||
<th width="100%">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>acl</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">list</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Current ACL on provided path (after changes, if any)</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['user::rwx', 'group::rwx', 'other::rwx']</div>
|
||||
</td>
|
||||
<div>Current ACL on provided path (after changes, if any)</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">['user::rwx', 'group::rwx', 'other::rwx']</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
|
||||
@@ -341,5 +340,3 @@ Authors
|
||||
|
||||
- Brian Coca (@bcoca)
|
||||
- Jérémie Astori (@astorije)
|
||||
|
||||
|
||||
|
||||
@@ -38,113 +38,115 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>command</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>A command to be executed in the future.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>A command to be executed in the future.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>count</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">integer</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The count of units in the future to execute the command or script file.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The count of units in the future to execute the command or script file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>script_file</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>An existing script file to be executed in the future.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>An existing script file to be executed in the future.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The state dictates if the command or script file should be evaluated as present(added) or absent(deleted).</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The state dictates if the command or script file should be evaluated as present(added) or absent(deleted).</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>unique</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If a matching job is present a new job will not be added.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If a matching job is present a new job will not be added.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>units</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>minutes</li>
|
||||
<li>hours</li>
|
||||
<li>days</li>
|
||||
<li>weeks</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The type of units in the future to execute the command or script file.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>minutes</li>
|
||||
<li>hours</li>
|
||||
<li>days</li>
|
||||
<li>weeks</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The type of units in the future to execute the command or script file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -155,7 +157,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Schedule a command to execute in 20 minutes as root
|
||||
ansible.posix.at:
|
||||
command: ls -d / >/dev/null
|
||||
@@ -177,7 +178,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -186,5 +186,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- Richard Isaacson (@risaacson)
|
||||
|
||||
|
||||
|
||||
@@ -31,191 +31,193 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>comment</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Change the comment on the public key.</div>
|
||||
<div>Rewriting the comment is useful in cases such as fetching it from GitHub or GitLab.</div>
|
||||
<div>If no comment is specified, the existing comment will be kept.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Change the comment on the public key.</div>
|
||||
<div>Rewriting the comment is useful in cases such as fetching it from GitHub or GitLab.</div>
|
||||
<div>If no comment is specified, the existing comment will be kept.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>exclusive</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether to remove all other non-specified keys from the authorized_keys file.</div>
|
||||
<div>Multiple keys can be specified in a single <code>key</code> string value by separating them by newlines.</div>
|
||||
<div>This option is not loop aware, so if you use <code>with_</code> , it will be exclusive per iteration of the loop.</div>
|
||||
<div>If you want multiple keys in the file you need to pass them all to <code>key</code> in a single batch as mentioned above.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether to remove all other non-specified keys from the authorized_keys file.</div>
|
||||
<div>Multiple keys can be specified in a single <code>key</code> string value by separating them by newlines.</div>
|
||||
<div>This option is not loop aware, so if you use <code>with_</code> , it will be exclusive per iteration of the loop.</div>
|
||||
<div>If you want multiple keys in the file you need to pass them all to <code>key</code> in a single batch as mentioned above.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>follow</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Follow path symlink instead of replacing it.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Follow path symlink instead of replacing it.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>key</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The SSH public key(s), as a string or (since Ansible 1.9) url (https://github.com/username.keys).</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The SSH public key(s), as a string or (since Ansible 1.9) url (https://github.com/username.keys).</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>key_options</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>A string of ssh key options to be prepended to the key in the authorized_keys file.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>A string of ssh key options to be prepended to the key in the authorized_keys file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>manage_dir</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether this module should manage the directory of the authorized key file.</div>
|
||||
<div>If set to <code>yes</code>, the module will create the directory, as well as set the owner and permissions of an existing directory.</div>
|
||||
<div>Be sure to set <code>manage_dir=no</code> if you are using an alternate directory for authorized_keys, as set with <code>path</code>, since you could lock yourself out of SSH access.</div>
|
||||
<div>See the example below.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether this module should manage the directory of the authorized key file.</div>
|
||||
<div>If set to <code>yes</code>, the module will create the directory, as well as set the owner and permissions of an existing directory.</div>
|
||||
<div>Be sure to set <code>manage_dir=no</code> if you are using an alternate directory for authorized_keys, as set with <code>path</code>, since you could lock yourself out of SSH access.</div>
|
||||
<div>See the example below.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>path</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Alternate path to the authorized_keys file.</div>
|
||||
<div>When unset, this value defaults to <em>~/.ssh/authorized_keys</em>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Alternate path to the authorized_keys file.</div>
|
||||
<div>When unset, this value defaults to <em>~/.ssh/authorized_keys</em>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether the given key (with the given key_options) should or should not be in the file.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether the given key (with the given key_options) should or should not be in the file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>user</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The username on the remote host whose authorized_keys file will be modified.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The username on the remote host whose authorized_keys file will be modified.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>validate_certs</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>This only applies if using a https url as the source of the keys.</div>
|
||||
<div>If set to <code>no</code>, the SSL certificates will not be validated.</div>
|
||||
<div>This should only set to <code>no</code> used on personally controlled sites using self-signed certificates as it avoids verifying the source site.</div>
|
||||
<div>Prior to 2.1 the code worked as if this was set to <code>yes</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>This only applies if using a https url as the source of the keys.</div>
|
||||
<div>If set to <code>no</code>, the SSL certificates will not be validated.</div>
|
||||
<div>This should only set to <code>no</code> used on personally controlled sites using self-signed certificates as it avoids verifying the source site.</div>
|
||||
<div>Prior to 2.1 the code worked as if this was set to <code>yes</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -226,7 +228,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Set authorized key taken from file
|
||||
ansible.posix.authorized_key:
|
||||
user: charlie
|
||||
@@ -285,7 +286,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Return Values
|
||||
-------------
|
||||
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
|
||||
@@ -298,169 +298,169 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
|
||||
<th>Returned</th>
|
||||
<th width="100%">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>exclusive</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>If the key has been forced to be exclusive or not.</div>
|
||||
<br/>
|
||||
</td>
|
||||
<div>If the key has been forced to be exclusive or not.</div>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>key</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>The key that the module was running against.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">https://github.com/user.keys</div>
|
||||
</td>
|
||||
<div>The key that the module was running against.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">https://github.com/user.keys</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>key_option</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Key options related to the key.</div>
|
||||
<br/>
|
||||
</td>
|
||||
<div>Key options related to the key.</div>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>keyfile</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Path for authorized key file.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/home/user/.ssh/authorized_keys</div>
|
||||
</td>
|
||||
<div>Path for authorized key file.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/home/user/.ssh/authorized_keys</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>manage_dir</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Whether this module managed the directory of the authorized key file.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
|
||||
</td>
|
||||
<div>Whether this module managed the directory of the authorized key file.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>path</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Alternate path to the authorized_keys file</div>
|
||||
<br/>
|
||||
</td>
|
||||
<div>Alternate path to the authorized_keys file</div>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Whether the given key (with the given key_options) should or should not be in the file</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">present</div>
|
||||
</td>
|
||||
<div>Whether the given key (with the given key_options) should or should not be in the file</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">present</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>unique</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>Whether the key is unique</div>
|
||||
<br/>
|
||||
</td>
|
||||
<div>Whether the key is unique</div>
|
||||
<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>user</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>The username on the remote host whose authorized_keys file will be modified</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">user</div>
|
||||
</td>
|
||||
<div>The username on the remote host whose authorized_keys file will be modified</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">user</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>validate_certs</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>success</td>
|
||||
<td>
|
||||
<div>This only applies if using a https url as the source of the keys. If set to <code>no</code>, the SSL certificates will not be validated.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
|
||||
</td>
|
||||
<div>This only applies if using a https url as the source of the keys. If set to <code>no</code>, the SSL certificates will not be validated.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
|
||||
@@ -472,5 +472,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- Ansible Core Team
|
||||
|
||||
|
||||
|
||||
@@ -36,247 +36,264 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>icmp_block</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The ICMP block you would like to add/remove to/from a zone in firewalld.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The ICMP block you would like to add/remove to/from a zone in firewalld.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>icmp_block_inversion</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Enable/Disable inversion of ICMP blocks for a zone in firewalld.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Enable/Disable inversion of ICMP blocks for a zone in firewalld.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>immediate</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Should this configuration be applied immediately, if set as permanent.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Should this configuration be applied immediately, if set as permanent.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>interface</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The interface you would like to add/remove to/from a zone in firewalld.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The interface you would like to add/remove to/from a zone in firewalld.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>masquerade</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The masquerade setting you would like to enable/disable to/from zones within firewalld.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The masquerade setting you would like to enable/disable to/from zones within firewalld.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>offline</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether to run this module even when firewalld is offline.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether to run this module even when firewalld is offline.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>permanent</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Should this configuration be in the running firewalld configuration or persist across reboots.</div>
|
||||
<div>As of Ansible 2.3, permanent operations can operate on firewalld configs when it is not running (requires firewalld >= 3.0.9).</div>
|
||||
<div>Note that if this is <code>no</code>, immediate is assumed <code>yes</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Should this configuration be in the running firewalld configuration or persist across reboots.</div>
|
||||
<div>As of Ansible 2.3, permanent operations can operate on firewalld configs when it is not running (requires firewalld >= 3.0.9).</div>
|
||||
<div>Note that if this is <code>no</code>, immediate is assumed <code>yes</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>port</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Name of a port or port range to add/remove to/from firewalld.</div>
|
||||
<div>Must be in the form PORT/PROTOCOL or PORT-PORT/PROTOCOL for port ranges.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Name of a port or port range to add/remove to/from firewalld.</div>
|
||||
<div>Must be in the form PORT/PROTOCOL or PORT-PORT/PROTOCOL for port ranges.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>port_forward</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Port and protocol to forward using firewalld.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>rich_rule</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Rich rule to add/remove to/from firewalld.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Rich rule to add/remove to/from firewalld.</div>
|
||||
<div>See <a href='https://firewalld.org/documentation/man-pages/firewalld.richlanguage.html'>Syntax for firewalld rich language rules</a>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>service</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Name of a service to add/remove to/from firewalld.</div>
|
||||
<div>The service must be listed in output of firewall-cmd --get-services.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Name of a service to add/remove to/from firewalld.</div>
|
||||
<div>The service must be listed in output of firewall-cmd --get-services.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>source</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The source/network you would like to add/remove to/from firewalld.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The source/network you would like to add/remove to/from firewalld.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li>disabled</li>
|
||||
<li>enabled</li>
|
||||
<li>present</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Enable or disable a setting.</div>
|
||||
<div>For ports: Should this port accept (enabled) or reject (disabled) connections.</div>
|
||||
<div>The states <code>present</code> and <code>absent</code> can only be used in zone level operations (i.e. when no other parameters but zone and state are set).</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li>disabled</li>
|
||||
<li>enabled</li>
|
||||
<li>present</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Enable or disable a setting.</div>
|
||||
<div>For ports: Should this port accept (enabled) or reject (disabled) connections.</div>
|
||||
<div>The states <code>present</code> and <code>absent</code> can only be used in zone level operations (i.e. when no other parameters but zone and state are set).</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>timeout</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">integer</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>The amount of time the rule should be in effect for when non-permanent.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>The amount of time the rule should be in effect for when non-permanent.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>zone</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The firewalld zone to add/remove to/from.</div>
|
||||
<div>Note that the default zone can be configured per system but <code>public</code> is default from upstream.</div>
|
||||
<div>Available choices can be extended based on per-system configs, listed here are "out of the box" defaults.</div>
|
||||
<div>Possible values include <code>block</code>, <code>dmz</code>, <code>drop</code>, <code>external</code>, <code>home</code>, <code>internal</code>, <code>public</code>, <code>trusted</code>, <code>work</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The firewalld zone to add/remove to/from.</div>
|
||||
<div>Note that the default zone can be configured per system but <code>public</code> is default from upstream.</div>
|
||||
<div>Available choices can be extended based on per-system configs, listed here are "out of the box" defaults.</div>
|
||||
<div>Possible values include <code>block</code>, <code>dmz</code>, <code>drop</code>, <code>external</code>, <code>home</code>, <code>internal</code>, <code>public</code>, <code>trusted</code>, <code>work</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -296,7 +313,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: permit traffic in default zone for https service
|
||||
ansible.posix.firewalld:
|
||||
service: https
|
||||
@@ -359,9 +375,13 @@ Examples
|
||||
permanent: yes
|
||||
icmp_block: echo-request
|
||||
|
||||
- name: Redirect port 443 to 8443 with Rich Rule
|
||||
- name: Redirect port 443 to 8443
|
||||
become: yes
|
||||
ansible.posix.firewalld:
|
||||
rich_rule: rule family=ipv4 forward-port port=443 protocol=tcp to-port=8443
|
||||
port_forward:
|
||||
- port: 443
|
||||
proto: tcp
|
||||
toport: 8443
|
||||
zone: public
|
||||
permanent: yes
|
||||
immediate: yes
|
||||
@@ -369,8 +389,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -379,5 +397,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- Adam Miller (@maxamillion)
|
||||
|
||||
|
||||
|
||||
@@ -31,193 +31,195 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>backup</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>boot</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Determines if the filesystem should be mounted on boot.</div>
|
||||
<div>Only applies to Solaris systems.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Determines if the filesystem should be mounted on boot.</div>
|
||||
<div>Only applies to Solaris systems.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>dump</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Dump (see fstab(5)).</div>
|
||||
<div>Note that if set to <code>null</code> and <em>state</em> set to <code>present</code>, it will cease to work and duplicate entries will be made with subsequent runs.</div>
|
||||
<div>Has no effect on Solaris systems.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Dump (see fstab(5)).</div>
|
||||
<div>Note that if set to <code>null</code> and <em>state</em> set to <code>present</code>, it will cease to work and duplicate entries will be made with subsequent runs.</div>
|
||||
<div>Has no effect on Solaris systems.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>fstab</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>File to use instead of <code>/etc/fstab</code>.</div>
|
||||
<div>You should not use this option unless you really know what you are doing.</div>
|
||||
<div>This might be useful if you need to configure mountpoints in a chroot environment.</div>
|
||||
<div>OpenBSD does not allow specifying alternate fstab files with mount so do not use this on OpenBSD with any state that operates on the live filesystem.</div>
|
||||
<div>This parameter defaults to /etc/fstab or /etc/vfstab on Solaris.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>File to use instead of <code>/etc/fstab</code>.</div>
|
||||
<div>You should not use this option unless you really know what you are doing.</div>
|
||||
<div>This might be useful if you need to configure mountpoints in a chroot environment.</div>
|
||||
<div>OpenBSD does not allow specifying alternate fstab files with mount so do not use this on OpenBSD with any state that operates on the live filesystem.</div>
|
||||
<div>This parameter defaults to /etc/fstab or /etc/vfstab on Solaris.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>fstype</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Filesystem type.</div>
|
||||
<div>Required when <em>state</em> is <code>present</code> or <code>mounted</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Filesystem type.</div>
|
||||
<div>Required when <em>state</em> is <code>present</code> or <code>mounted</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>opts</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Mount options (see fstab(5), or vfstab(4) on Solaris).</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Mount options (see fstab(5), or vfstab(4) on Solaris).</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>passno</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Passno (see fstab(5)).</div>
|
||||
<div>Note that if set to <code>null</code> and <em>state</em> set to <code>present</code>, it will cease to work and duplicate entries will be made with subsequent runs.</div>
|
||||
<div>Deprecated on Solaris systems.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Passno (see fstab(5)).</div>
|
||||
<div>Note that if set to <code>null</code> and <em>state</em> set to <code>present</code>, it will cease to work and duplicate entries will be made with subsequent runs.</div>
|
||||
<div>Deprecated on Solaris systems.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>path</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path to the mount point (e.g. <code>/mnt/files</code>).</div>
|
||||
<div>Before Ansible 2.3 this option was only usable as <em>dest</em>, <em>destfile</em> and <em>name</em>.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: name</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path to the mount point (e.g. <code>/mnt/files</code>).</div>
|
||||
<div>Before Ansible 2.3 this option was only usable as <em>dest</em>, <em>destfile</em> and <em>name</em>.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: name</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>src</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Device (or NFS volume, or something else) to be mounted on <em>path</em>.</div>
|
||||
<div>Required when <em>state</em> set to <code>present</code> or <code>mounted</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Device (or NFS volume, or something else) to be mounted on <em>path</em>.</div>
|
||||
<div>Required when <em>state</em> set to <code>present</code> or <code>mounted</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li>mounted</li>
|
||||
<li>present</li>
|
||||
<li>unmounted</li>
|
||||
<li>remounted</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If <code>mounted</code>, the device will be actively mounted and appropriately configured in <em>fstab</em>. If the mount point is not present, the mount point will be created.</div>
|
||||
<div>If <code>unmounted</code>, the device will be unmounted without changing <em>fstab</em>.</div>
|
||||
<div><code>present</code> only specifies that the device is to be configured in <em>fstab</em> and does not trigger or require a mount.</div>
|
||||
<div><code>absent</code> specifies that the device mount's entry will be removed from <em>fstab</em> and will also unmount the device and remove the mount point.</div>
|
||||
<div><code>remounted</code> specifies that the device will be remounted for when you want to force a refresh on the mount itself (added in 2.9). This will always return changed=true. If <em>opts</em> is set, the options will be applied to the remount, but will not change <em>fstab</em>. Additionally, if <em>opts</em> is set, and the remount command fails, the module will error to prevent unexpected mount changes. Try using <code>mounted</code> instead to work around this issue.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li>mounted</li>
|
||||
<li>present</li>
|
||||
<li>unmounted</li>
|
||||
<li>remounted</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If <code>mounted</code>, the device will be actively mounted and appropriately configured in <em>fstab</em>. If the mount point is not present, the mount point will be created.</div>
|
||||
<div>If <code>unmounted</code>, the device will be unmounted without changing <em>fstab</em>.</div>
|
||||
<div><code>present</code> only specifies that the device is to be configured in <em>fstab</em> and does not trigger or require a mount.</div>
|
||||
<div><code>absent</code> specifies that the device mount's entry will be removed from <em>fstab</em> and will also unmount the device and remove the mount point.</div>
|
||||
<div><code>remounted</code> specifies that the device will be remounted for when you want to force a refresh on the mount itself (added in 2.9). This will always return changed=true. If <em>opts</em> is set, the options will be applied to the remount, but will not change <em>fstab</em>. Additionally, if <em>opts</em> is set, and the remount command fails, the module will error to prevent unexpected mount changes. Try using <code>mounted</code> instead to work around this issue.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -235,7 +237,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
# Before 2.3, option 'name' was used instead of 'path'
|
||||
- name: Mount DVD read-only
|
||||
ansible.posix.mount:
|
||||
@@ -298,7 +299,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -308,5 +308,3 @@ Authors
|
||||
|
||||
- Ansible Core Team
|
||||
- Seth Vidal (@skvidal)
|
||||
|
||||
|
||||
|
||||
@@ -31,172 +31,173 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>backup</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Passes <code>--backup --version-control=numbered</code> to patch, producing numbered backup copies.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Passes <code>--backup --version-control=numbered</code> to patch, producing numbered backup copies.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>basedir</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path of a base directory in which the patch file will be applied.</div>
|
||||
<div>May be omitted when <code>dest</code> option is specified, otherwise required.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path of a base directory in which the patch file will be applied.</div>
|
||||
<div>May be omitted when <code>dest</code> option is specified, otherwise required.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>binary</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Setting to <code>yes</code> will disable patch's heuristic for transforming CRLF line endings into LF.</div>
|
||||
<div>Line endings of src and dest must match.</div>
|
||||
<div>If set to <code>no</code>, <code>patch</code> will replace CRLF in <code>src</code> files on POSIX.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Setting to <code>yes</code> will disable patch's heuristic for transforming CRLF line endings into LF.</div>
|
||||
<div>Line endings of src and dest must match.</div>
|
||||
<div>If set to <code>no</code>, <code>patch</code> will replace CRLF in <code>src</code> files on POSIX.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>dest</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path of the file on the remote machine to be patched.</div>
|
||||
<div>The names of the files to be patched are usually taken from the patch file, but if there's just one file to be patched it can specified with this option.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: originalfile</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path of the file on the remote machine to be patched.</div>
|
||||
<div>The names of the files to be patched are usually taken from the patch file, but if there's just one file to be patched it can specified with this option.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: originalfile</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>ignore_whitespace</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Setting to <code>yes</code> will ignore white space changes between patch and input..</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Setting to <code>yes</code> will ignore white space changes between patch and input..</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>remote_src</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If <code>no</code>, it will search for src at originating/controller machine, if <code>yes</code> it will go to the remote/target machine for the <code>src</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If <code>no</code>, it will search for src at originating/controller machine, if <code>yes</code> it will go to the remote/target machine for the <code>src</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>src</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path of the patch file as accepted by the GNU patch tool. If <code>remote_src</code> is 'no', the patch source file is looked up from the module's <em>files</em> directory.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: patchfile</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path of the patch file as accepted by the GNU patch tool. If <code>remote_src</code> is 'no', the patch source file is looked up from the module's <em>files</em> directory.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: patchfile</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether the patch should be applied or reverted.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>absent</li>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether the patch should be applied or reverted.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>strip</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">integer</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Number that indicates the smallest prefix containing leading slashes that will be stripped from each file name found in the patch file.</div>
|
||||
<div>For more information see the strip parameter of the GNU patch tool.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Number that indicates the smallest prefix containing leading slashes that will be stripped from each file name found in the patch file.</div>
|
||||
<div>For more information see the strip parameter of the GNU patch tool.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -213,7 +214,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Apply patch to one file
|
||||
ansible.posix.patch:
|
||||
src: /tmp/index.html.patch
|
||||
@@ -234,7 +234,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -244,5 +243,3 @@ Authors
|
||||
|
||||
- Jakub Jirutka (@jirutka)
|
||||
- Luis Alberto Perez Lazaro (@luisperlaz)
|
||||
|
||||
|
||||
|
||||
@@ -38,81 +38,83 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>ignore_selinux_state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Useful for scenarios (chrooted environment) that you can't get the real SELinux state.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Useful for scenarios (chrooted environment) that you can't get the real SELinux state.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>name</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Name of the boolean to configure.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Name of the boolean to configure.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>persistent</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Set to <code>yes</code> if the boolean setting should survive a reboot.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Set to <code>yes</code> if the boolean setting should survive a reboot.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Desired boolean value</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Desired boolean value</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -129,7 +131,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Set httpd_can_network_connect flag on and keep it persistent across reboots
|
||||
ansible.posix.seboolean:
|
||||
name: httpd_can_network_connect
|
||||
@@ -139,7 +140,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -148,5 +148,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- Stephen Fromm (@sfromm)
|
||||
|
||||
|
||||
|
||||
@@ -39,61 +39,62 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>configfile</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">"/etc/selinux/config"</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>The path to the SELinux configuration file, if non-standard.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: conf, file</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">"/etc/selinux/config"</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>The path to the SELinux configuration file, if non-standard.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: conf, file</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>policy</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The name of the SELinux policy to use (e.g. <code>targeted</code>) will be required if state is not <code>disabled</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The name of the SELinux policy to use (e.g. <code>targeted</code>) will be required if state is not <code>disabled</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>disabled</li>
|
||||
<li>enforcing</li>
|
||||
<li>permissive</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The SELinux mode.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>disabled</li>
|
||||
<li>enforcing</li>
|
||||
<li>permissive</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>The SELinux mode.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -104,7 +105,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Enable SELinux
|
||||
ansible.posix.selinux:
|
||||
policy: targeted
|
||||
@@ -121,7 +121,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Return Values
|
||||
-------------
|
||||
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
|
||||
@@ -134,92 +133,92 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
|
||||
<th>Returned</th>
|
||||
<th width="100%">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>configfile</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>always</td>
|
||||
<td>
|
||||
<div>Path to SELinux configuration file.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/etc/selinux/config</div>
|
||||
</td>
|
||||
<div>Path to SELinux configuration file.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">/etc/selinux/config</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>msg</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>always</td>
|
||||
<td>
|
||||
<div>Messages that describe changes that were made.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">Config SELinux state changed from 'disabled' to 'permissive'</div>
|
||||
</td>
|
||||
<div>Messages that describe changes that were made.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">Config SELinux state changed from 'disabled' to 'permissive'</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>policy</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>always</td>
|
||||
<td>
|
||||
<div>Name of the SELinux policy.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">targeted</div>
|
||||
</td>
|
||||
<div>Name of the SELinux policy.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">targeted</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>reboot_required</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>always</td>
|
||||
<td>
|
||||
<div>Whether or not an reboot is required for the changes to take effect.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
|
||||
</td>
|
||||
<div>Whether or not an reboot is required for the changes to take effect.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="return-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>always</td>
|
||||
<td>
|
||||
<div>SELinux mode.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">enforcing</div>
|
||||
</td>
|
||||
<div>SELinux mode.</div>
|
||||
<br/>
|
||||
<div style="font-size: smaller"><b>Sample:</b></div>
|
||||
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">enforcing</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
|
||||
@@ -231,5 +230,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- Derek Carter (@goozbach) <goozbach@friocorte.com>
|
||||
|
||||
|
||||
|
||||
@@ -34,492 +34,494 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>archive</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>checksum</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Skip based on checksum, rather than mod-time & size; Note that that "archive" option is still enabled by default - the "checksum" option will not disable it.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Skip based on checksum, rather than mod-time & size; Note that that "archive" option is still enabled by default - the "checksum" option will not disable it.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>compress</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Compress file data during the transfer.</div>
|
||||
<div>In most cases, leave this enabled unless it causes problems.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Compress file data during the transfer.</div>
|
||||
<div>In most cases, leave this enabled unless it causes problems.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>copy_links</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>delete</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Delete files in <code>dest</code> that don't exist (after transfer, not before) in the <code>src</code> path.</div>
|
||||
<div>This option requires <code>recursive=yes</code>.</div>
|
||||
<div>This option ignores excluded files and behaves like the rsync opt --delete-excluded.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Delete files in <code>dest</code> that don't exist (after transfer, not before) in the <code>src</code> path.</div>
|
||||
<div>This option requires <code>recursive=yes</code>.</div>
|
||||
<div>This option ignores excluded files and behaves like the rsync opt --delete-excluded.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>dest</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path on the destination host that will be synchronized from the source.</div>
|
||||
<div>The path can be absolute or relative.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path on the destination host that will be synchronized from the source.</div>
|
||||
<div>The path can be absolute or relative.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>dest_port</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">integer</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Port number for ssh on the destination host.</div>
|
||||
<div>Prior to Ansible 2.0, the ansible_ssh_port inventory var took precedence over this value.</div>
|
||||
<div>This parameter defaults to the value of <code>ansible_ssh_port</code> or <code>ansible_port</code>, the <code>remote_port</code> config setting or the value from ssh client configuration if none of the former have been set.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Port number for ssh on the destination host.</div>
|
||||
<div>Prior to Ansible 2.0, the ansible_ssh_port inventory var took precedence over this value.</div>
|
||||
<div>This parameter defaults to the value of <code>ansible_ssh_port</code> or <code>ansible_port</code>, the <code>remote_port</code> config setting or the value from ssh client configuration if none of the former have been set.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>dirs</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Transfer directories without recursing.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Transfer directories without recursing.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>existing_only</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Skip creating new files on receiver.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Skip creating new files on receiver.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>group</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve group.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve group.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>link_dest</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">list</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">null</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Add a destination to hard link against during the rsync.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">null</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Add a destination to hard link against during the rsync.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>links</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Copy symlinks as symlinks.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Copy symlinks as symlinks.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>mode</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>pull</li>
|
||||
<li><div style="color: blue"><b>push</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify the direction of the synchronization.</div>
|
||||
<div>In push mode the localhost or delegate is the source.</div>
|
||||
<div>In pull mode the remote host in context is the source.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>pull</li>
|
||||
<li><div style="color: blue"><b>push</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify the direction of the synchronization.</div>
|
||||
<div>In push mode the localhost or delegate is the source.</div>
|
||||
<div>In pull mode the remote host in context is the source.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>owner</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve owner (super user only).</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve owner (super user only).</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>partial</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>perms</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve permissions.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve permissions.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>private_key</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">path</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify the private key to use for SSH-based rsync connections (e.g. <code>~/.ssh/id_rsa</code>).</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify the private key to use for SSH-based rsync connections (e.g. <code>~/.ssh/id_rsa</code>).</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>recursive</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Recurse into directories.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Recurse into directories.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>rsync_opts</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">list</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">null</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify additional rsync options by passing in an array.</div>
|
||||
<div>Note that an empty string in <code>rsync_opts</code> will end up transfer the current working directory.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">null</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify additional rsync options by passing in an array.</div>
|
||||
<div>Note that an empty string in <code>rsync_opts</code> will end up transfer the current working directory.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>rsync_path</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify the rsync command to run on the remote host. See <code>--rsync-path</code> on the rsync man page.</div>
|
||||
<div>To specify the rsync command to run on the local host, you need to set this your task var <code>ansible_rsync_path</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify the rsync command to run on the remote host. See <code>--rsync-path</code> on the rsync man page.</div>
|
||||
<div>To specify the rsync command to run on the local host, you need to set this your task var <code>ansible_rsync_path</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>rsync_timeout</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">integer</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify a <code>--timeout</code> for the rsync command in seconds.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">0</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specify a <code>--timeout</code> for the rsync command in seconds.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>set_remote_user</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Put user@ for the remote paths.</div>
|
||||
<div>If you have a custom ssh config to define the remote user for a host that does not match the inventory user, you should set this parameter to <code>no</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Put user@ for the remote paths.</div>
|
||||
<div>If you have a custom ssh config to define the remote user for a host that does not match the inventory user, you should set this parameter to <code>no</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>src</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">string</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path on the source host that will be synchronized to the destination.</div>
|
||||
<div>The path can be absolute or relative.</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Path on the source host that will be synchronized to the destination.</div>
|
||||
<div>The path can be absolute or relative.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>times</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve modification times.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Preserve modification times.</div>
|
||||
<div>This parameter defaults to the value of the archive option.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>use_ssh_args</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Use the ssh_args specified in ansible.cfg.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Use the ssh_args specified in ansible.cfg.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>verify_host</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Verify destination host key.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Verify destination host key.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -560,7 +562,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
- name: Synchronization of src on the control machine to dest on the remote hosts
|
||||
ansible.posix.synchronize:
|
||||
src: some/relative/path
|
||||
@@ -689,7 +690,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -698,5 +698,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- Timothy Appnel (@tima)
|
||||
|
||||
|
||||
|
||||
@@ -31,133 +31,134 @@ Parameters
|
||||
<tr>
|
||||
<th colspan="1">Parameter</th>
|
||||
<th>Choices/<font color="blue">Defaults</font></th>
|
||||
<th width="100%">Comments</th>
|
||||
<th width="100%">Comments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>ignoreerrors</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Use this option to ignore errors about unknown keys.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Use this option to ignore errors about unknown keys.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>name</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
/ <span style="color: red">required</span> </div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The dot-separated path (aka <em>key</em>) specifying the sysctl variable.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: key</div>
|
||||
</td>
|
||||
/ <span style="color: red">required</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>The dot-separated path (aka <em>key</em>) specifying the sysctl variable.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: key</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>reload</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If <code>yes</code>, performs a <em>/sbin/sysctl -p</em> if the <code>sysctl_file</code> is updated. If <code>no</code>, does not reload <em>sysctl</em> even if the <code>sysctl_file</code> is updated.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li>no</li>
|
||||
<li><div style="color: blue"><b>yes</b> ←</div></li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>If <code>yes</code>, performs a <em>/sbin/sysctl -p</em> if the <code>sysctl_file</code> is updated. If <code>no</code>, does not reload <em>sysctl</em> even if the <code>sysctl_file</code> is updated.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>state</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
<li>absent</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether the entry should be present or absent in the sysctl file.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>present</b> ←</div></li>
|
||||
<li>absent</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Whether the entry should be present or absent in the sysctl file.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>sysctl_file</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">"/etc/sysctl.conf"</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specifies the absolute path to <code>sysctl.conf</code>, if not <code>/etc/sysctl.conf</code>.</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<b>Default:</b><br/><div style="color: blue">"/etc/sysctl.conf"</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>Specifies the absolute path to <code>sysctl.conf</code>, if not <code>/etc/sysctl.conf</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>sysctl_set</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">boolean</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Verify token value with the sysctl command and set with -w if necessary</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul style="margin: 0; padding: 0"><b>Choices:</b>
|
||||
<li><div style="color: blue"><b>no</b> ←</div></li>
|
||||
<li>yes</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<div>Verify token value with the sysctl command and set with -w if necessary</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<tr>
|
||||
<td colspan="1">
|
||||
<div class="ansibleOptionAnchor" id="parameter-"></div>
|
||||
<b>value</b>
|
||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||
<div style="font-size: small">
|
||||
<span style="color: purple">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Desired value of the sysctl key.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: val</div>
|
||||
</td>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<div>Desired value of the sysctl key.</div>
|
||||
<div style="font-size: small; color: darkgreen"><br/>aliases: val</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
|
||||
@@ -168,7 +169,6 @@ Examples
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
|
||||
# Set vm.swappiness to 5 in /etc/sysctl.conf
|
||||
- ansible.posix.sysctl:
|
||||
name: vm.swappiness
|
||||
@@ -205,7 +205,6 @@ Examples
|
||||
|
||||
|
||||
|
||||
|
||||
Status
|
||||
------
|
||||
|
||||
@@ -214,5 +213,3 @@ Authors
|
||||
~~~~~~~
|
||||
|
||||
- David CHANIAL (@davixx) <david.chanial@gmail.com>
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: ansible
|
||||
name: posix
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (github.com/ansible)
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
requires_ansible: '>=2.9,<2.11'
|
||||
requires_ansible: '>=2.9'
|
||||
|
||||
@@ -33,7 +33,13 @@ class ActionModule(ActionBase):
|
||||
def _get_absolute_path(self, path):
|
||||
original_path = path
|
||||
|
||||
if path.startswith('rsync://'):
|
||||
#
|
||||
# Check if we have a local relative path and do not process
|
||||
# * remote paths (some.server.domain:/some/remote/path/...)
|
||||
# * URLs (rsync://...)
|
||||
# * local absolute paths (/some/local/path/...)
|
||||
#
|
||||
if ':' in path or path.startswith('/'):
|
||||
return path
|
||||
|
||||
if self._task._role is not None:
|
||||
@@ -60,7 +66,7 @@ class ActionModule(ActionBase):
|
||||
return path
|
||||
|
||||
# If using docker or buildah, do not add user information
|
||||
if self._remote_transport not in ['docker', 'buildah'] and user:
|
||||
if self._remote_transport not in ['docker', 'community.general.docker', 'community.docker.docker', 'buildah', 'containers.podman.buildah'] and user:
|
||||
user_prefix = '%s@' % (user, )
|
||||
|
||||
if self._host_is_ipv6_address(host):
|
||||
@@ -73,8 +79,7 @@ class ActionModule(ActionBase):
|
||||
if host not in C.LOCALHOST:
|
||||
return self._format_rsync_rsh_target(host, path, user)
|
||||
|
||||
if ':' not in path and not path.startswith('/'):
|
||||
path = self._get_absolute_path(path=path)
|
||||
path = self._get_absolute_path(path=path)
|
||||
return path
|
||||
|
||||
def _process_remote(self, task_args, host, path, user, port_matches_localhost_port):
|
||||
@@ -103,8 +108,7 @@ class ActionModule(ActionBase):
|
||||
task_args['_substitute_controller'] = True
|
||||
return self._format_rsync_rsh_target(host, path, user)
|
||||
|
||||
if ':' not in path and not path.startswith('/'):
|
||||
path = self._get_absolute_path(path=path)
|
||||
path = self._get_absolute_path(path=path)
|
||||
return path
|
||||
|
||||
def _override_module_replaced_vars(self, task_vars):
|
||||
@@ -170,7 +174,7 @@ class ActionModule(ActionBase):
|
||||
self._remote_transport = self._connection.transport
|
||||
|
||||
# Handle docker connection options
|
||||
if self._remote_transport == 'docker':
|
||||
if self._remote_transport in ['docker', 'community.general.docker', 'community.docker.docker']:
|
||||
self._docker_cmd = self._connection.docker_cmd
|
||||
if self._play_context.docker_extra_args:
|
||||
self._docker_cmd = "%s %s" % (self._docker_cmd, self._play_context.docker_extra_args)
|
||||
@@ -192,7 +196,7 @@ class ActionModule(ActionBase):
|
||||
# ssh paramiko docker buildah and local are fully supported transports. Anything
|
||||
# else only works with delegate_to
|
||||
if delegate_to is None and self._connection.transport not in \
|
||||
('ssh', 'paramiko', 'local', 'docker', 'buildah'):
|
||||
('ssh', 'paramiko', 'local', 'docker', 'community.general.docker', 'community.docker.docker', 'buildah', 'containers.podman.buildah'):
|
||||
result['failed'] = True
|
||||
result['msg'] = (
|
||||
"synchronize uses rsync to function. rsync needs to connect to the remote "
|
||||
@@ -333,10 +337,8 @@ class ActionModule(ActionBase):
|
||||
user = task_vars.get('ansible_ssh_user') or self._play_context.remote_user
|
||||
|
||||
# Private key handling
|
||||
private_key = self._play_context.private_key_file
|
||||
|
||||
if private_key is not None:
|
||||
_tmp_args['private_key'] = private_key
|
||||
# Use the private_key parameter if passed else use context private_key_file
|
||||
_tmp_args['private_key'] = _tmp_args.get('private_key', self._play_context.private_key_file)
|
||||
|
||||
# use the mode to define src and dest's url
|
||||
if _tmp_args.get('mode', 'push') == 'pull':
|
||||
@@ -350,10 +352,8 @@ class ActionModule(ActionBase):
|
||||
else:
|
||||
# Still need to munge paths (to account for roles) even if we aren't
|
||||
# copying files between hosts
|
||||
if not src.startswith('/'):
|
||||
src = self._get_absolute_path(path=src)
|
||||
if not dest.startswith('/'):
|
||||
dest = self._get_absolute_path(path=dest)
|
||||
src = self._get_absolute_path(path=src)
|
||||
dest = self._get_absolute_path(path=dest)
|
||||
|
||||
_tmp_args['src'] = src
|
||||
_tmp_args['dest'] = dest
|
||||
@@ -367,7 +367,7 @@ class ActionModule(ActionBase):
|
||||
if not dest_is_local:
|
||||
# don't escalate for docker. doing --rsync-path with docker exec fails
|
||||
# and we can switch directly to the user via docker arguments
|
||||
if self._play_context.become and not rsync_path and self._remote_transport != 'docker':
|
||||
if self._play_context.become and not rsync_path and self._remote_transport not in ['docker', 'community.general.docker', 'community.docker.docker']:
|
||||
# If no rsync_path is set, become was originally set, and dest is
|
||||
# remote then add privilege escalation here.
|
||||
if self._play_context.become_method == 'sudo':
|
||||
@@ -391,7 +391,9 @@ class ActionModule(ActionBase):
|
||||
|
||||
# If launching synchronize against docker container
|
||||
# use rsync_opts to support container to override rsh options
|
||||
if self._remote_transport in ['docker', 'buildah'] and not use_delegate:
|
||||
if self._remote_transport in [
|
||||
'docker', 'community.general.docker', 'community.docker.docker', 'buildah', 'containers.podman.buildah'
|
||||
] and not use_delegate:
|
||||
# Replicate what we do in the module argumentspec handling for lists
|
||||
if not isinstance(_tmp_args.get('rsync_opts'), MutableSequence):
|
||||
tmp_rsync_opts = _tmp_args.get('rsync_opts', [])
|
||||
@@ -404,14 +406,14 @@ class ActionModule(ActionBase):
|
||||
if '--blocking-io' not in _tmp_args['rsync_opts']:
|
||||
_tmp_args['rsync_opts'].append('--blocking-io')
|
||||
|
||||
if self._remote_transport in ['docker']:
|
||||
if self._remote_transport in ['docker', 'community.general.docker', 'community.docker.docker']:
|
||||
if become and self._play_context.become_user:
|
||||
_tmp_args['rsync_opts'].append("--rsh=%s exec -u %s -i" % (self._docker_cmd, self._play_context.become_user))
|
||||
elif user is not None:
|
||||
_tmp_args['rsync_opts'].append("--rsh=%s exec -u %s -i" % (self._docker_cmd, user))
|
||||
else:
|
||||
_tmp_args['rsync_opts'].append("--rsh=%s exec -i" % self._docker_cmd)
|
||||
elif self._remote_transport in ['buildah']:
|
||||
elif self._remote_transport in ['buildah', 'containers.podman.buildah']:
|
||||
_tmp_args['rsync_opts'].append("--rsh=buildah run --")
|
||||
|
||||
# run the module and store the result
|
||||
|
||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
short_description: Ansible screen output that ignores skipped status
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_at_date: 2022-06-01
|
||||
alternative: "'default' callback plugin with 'display_skipped_hosts = no' option"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
# (c) 2013-2018, Adam Miller (maxamillion@fedoraproject.org)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
# Imports and info for sanity checking
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
# agrees to be bound by the terms and conditions of this License
|
||||
# Agreement.
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ options:
|
||||
- The C(query) state gets the current ACL without changing it, for use in C(register) operations.
|
||||
choices: [ absent, present, query ]
|
||||
default: query
|
||||
type: str
|
||||
follow:
|
||||
description:
|
||||
- Whether to follow symlinks on the path if a symlink is encountered.
|
||||
@@ -42,13 +43,17 @@ options:
|
||||
entity:
|
||||
description:
|
||||
- The actual user or group that the ACL applies to when matching entity types user or group are selected.
|
||||
type: str
|
||||
etype:
|
||||
description:
|
||||
- The entity type of the ACL to apply, see C(setfacl) documentation for more info.
|
||||
choices: [ group, mask, other, user ]
|
||||
type: str
|
||||
permissions:
|
||||
description:
|
||||
- The permissions to apply/remove can be any combination of C(r), C(w) and C(x) (read, write and execute respectively)
|
||||
- The permissions to apply/remove can be any combination of C(r), C(w), C(x)
|
||||
- (read, write and execute respectively), and C(X) (execute permission if the file is a directory or already has execute permission for some user)
|
||||
type: str
|
||||
entry:
|
||||
description:
|
||||
- DEPRECATED.
|
||||
@@ -57,6 +62,7 @@ options:
|
||||
- The qualifier may be empty for some types, but the type and perms are always required.
|
||||
- C(-) can be used as placeholder when you do not care about permissions.
|
||||
- This is now superseded by entity, type and permissions fields.
|
||||
type: str
|
||||
recursive:
|
||||
description:
|
||||
- Recursively sets the specified ACL.
|
||||
@@ -75,6 +81,7 @@ options:
|
||||
- Incompatible with C(state=query).
|
||||
choices: [ default, mask, no_mask ]
|
||||
default: default
|
||||
type: str
|
||||
author:
|
||||
- Brian Coca (@bcoca)
|
||||
- Jérémie Astori (@astorije)
|
||||
|
||||
@@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: at
|
||||
short_description: Schedule the execution of a command or script file via the at command
|
||||
@@ -29,12 +29,10 @@ options:
|
||||
description:
|
||||
- The count of units in the future to execute the command or script file.
|
||||
type: int
|
||||
required: true
|
||||
units:
|
||||
description:
|
||||
- The type of units in the future to execute the command or script file.
|
||||
type: str
|
||||
required: true
|
||||
choices: [ minutes, hours, days, weeks ]
|
||||
state:
|
||||
description:
|
||||
@@ -74,6 +72,7 @@ EXAMPLES = r'''
|
||||
'''
|
||||
|
||||
import os
|
||||
import platform
|
||||
import tempfile
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
@@ -89,7 +88,7 @@ def add_job(module, result, at_cmd, count, units, command, script_file):
|
||||
|
||||
def delete_job(module, result, at_cmd, command, script_file):
|
||||
for matching_job in get_matching_jobs(module, at_cmd, script_file):
|
||||
at_command = "%s -d %s" % (at_cmd, matching_job)
|
||||
at_command = "%s -r %s" % (at_cmd, matching_job)
|
||||
rc, out, err = module.run_command(at_command, check_rc=True)
|
||||
result['changed'] = True
|
||||
if command:
|
||||
@@ -117,7 +116,8 @@ def get_matching_jobs(module, at_cmd, script_file):
|
||||
# If the script text is contained in a job add job number to list.
|
||||
for current_job in current_jobs:
|
||||
split_current_job = current_job.split()
|
||||
at_command = "%s -c %s" % (at_cmd, split_current_job[0])
|
||||
at_opt = '-c' if platform.system() != 'AIX' else '-lv'
|
||||
at_command = "%s %s %s" % (at_cmd, at_opt, split_current_job[0])
|
||||
rc, out, err = module.run_command(at_command, check_rc=True)
|
||||
if script_file_string in out:
|
||||
matching_jobs.append(split_current_job[0])
|
||||
|
||||
@@ -50,6 +50,7 @@ options:
|
||||
key_options:
|
||||
description:
|
||||
- A string of ssh key options to be prepended to the key in the authorized_keys file.
|
||||
type: str
|
||||
exclusive:
|
||||
description:
|
||||
- Whether to remove all other non-specified keys from the authorized_keys file.
|
||||
|
||||
@@ -24,9 +24,36 @@ options:
|
||||
- Name of a port or port range to add/remove to/from firewalld.
|
||||
- Must be in the form PORT/PROTOCOL or PORT-PORT/PROTOCOL for port ranges.
|
||||
type: str
|
||||
port_forward:
|
||||
description:
|
||||
- Port and protocol to forward using firewalld.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
port:
|
||||
type: str
|
||||
required: true
|
||||
description:
|
||||
- Source port to forward from
|
||||
proto:
|
||||
type: str
|
||||
required: true
|
||||
description:
|
||||
- protocol to forward
|
||||
choices: [udp, tcp]
|
||||
toport:
|
||||
type: str
|
||||
required: true
|
||||
description:
|
||||
- destination port
|
||||
toaddr:
|
||||
type: str
|
||||
description:
|
||||
- Optional address to forward to
|
||||
rich_rule:
|
||||
description:
|
||||
- Rich rule to add/remove to/from firewalld.
|
||||
- See L(Syntax for firewalld rich language rules,https://firewalld.org/documentation/man-pages/firewalld.richlanguage.html).
|
||||
type: str
|
||||
source:
|
||||
description:
|
||||
@@ -83,6 +110,13 @@ options:
|
||||
description:
|
||||
- Whether to run this module even when firewalld is offline.
|
||||
type: bool
|
||||
target:
|
||||
description:
|
||||
- firewalld Zone target
|
||||
- If state is set to C(absent), this will reset the target to default
|
||||
choices: [ default, ACCEPT, DROP, REJECT ]
|
||||
type: str
|
||||
version_added: 1.2.0
|
||||
notes:
|
||||
- Not tested on any Debian based system.
|
||||
- Requires the python2 bindings of firewalld, which may not be installed by default.
|
||||
@@ -163,6 +197,12 @@ EXAMPLES = r'''
|
||||
permanent: yes
|
||||
icmp_block: echo-request
|
||||
|
||||
- ansible.posix.firewalld:
|
||||
zone: internal
|
||||
state: present
|
||||
permanent: yes
|
||||
target: ACCEPT
|
||||
|
||||
- name: Redirect port 443 to 8443 with Rich Rule
|
||||
ansible.posix.firewalld:
|
||||
rich_rule: rule family=ipv4 forward-port port=443 protocol=tcp to-port=8443
|
||||
@@ -570,6 +610,53 @@ class SourceTransaction(FirewallTransaction):
|
||||
self.update_fw_settings(fw_zone, fw_settings)
|
||||
|
||||
|
||||
class ZoneTargetTransaction(FirewallTransaction):
|
||||
"""
|
||||
ZoneTargetTransaction
|
||||
"""
|
||||
|
||||
def __init__(self, module, action_args=None, zone=None, desired_state=None,
|
||||
permanent=True, immediate=False, enabled_values=None, disabled_values=None):
|
||||
super(ZoneTargetTransaction, self).__init__(
|
||||
module, action_args=action_args, desired_state=desired_state, zone=zone,
|
||||
permanent=permanent, immediate=immediate,
|
||||
enabled_values=enabled_values or ["present", "enabled"],
|
||||
disabled_values=disabled_values or ["absent", "disabled"])
|
||||
|
||||
self.enabled_msg = "Set zone %s target to %s" % \
|
||||
(self.zone, action_args[0])
|
||||
|
||||
self.disabled_msg = "Reset zone %s target to default" % \
|
||||
(self.zone)
|
||||
|
||||
self.tx_not_permanent_error_msg = "Zone operations must be permanent. " \
|
||||
"Make sure you didn't set the 'permanent' flag to 'false' or the 'immediate' flag to 'true'."
|
||||
|
||||
def get_enabled_immediate(self, target):
|
||||
self.module.fail_json(msg=self.tx_not_permanent_error_msg)
|
||||
|
||||
def get_enabled_permanent(self, target):
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
current_target = fw_settings.getTarget()
|
||||
return (current_target == target)
|
||||
|
||||
def set_enabled_immediate(self, target):
|
||||
self.module.fail_json(msg=self.tx_not_permanent_error_msg)
|
||||
|
||||
def set_enabled_permanent(self, target):
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
fw_settings.setTarget(target)
|
||||
self.update_fw_settings(fw_zone, fw_settings)
|
||||
|
||||
def set_disabled_immediate(self, target):
|
||||
self.module.fail_json(msg=self.tx_not_permanent_error_msg)
|
||||
|
||||
def set_disabled_permanent(self, target):
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
fw_settings.setTarget("default")
|
||||
self.update_fw_settings(fw_zone, fw_settings)
|
||||
|
||||
|
||||
class ZoneTransaction(FirewallTransaction):
|
||||
"""
|
||||
ZoneTransaction
|
||||
@@ -617,6 +704,55 @@ class ZoneTransaction(FirewallTransaction):
|
||||
zone_obj.remove()
|
||||
|
||||
|
||||
class ForwardPortTransaction(FirewallTransaction):
|
||||
"""
|
||||
ForwardPortTransaction
|
||||
"""
|
||||
|
||||
def __init__(self, module, action_args=None, zone=None, desired_state=None, permanent=False, immediate=False):
|
||||
super(ForwardPortTransaction, self).__init__(
|
||||
module, action_args=action_args, desired_state=desired_state, zone=zone, permanent=permanent, immediate=immediate
|
||||
)
|
||||
|
||||
def get_enabled_immediate(self, port, proto, toport, toaddr, timeout):
|
||||
forward_port = [port, proto, toport, toaddr]
|
||||
if self.fw_offline:
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
forward_list = fw_settings.getForwardPorts()
|
||||
else:
|
||||
forward_list = self.fw.getForwardPorts(self.zone)
|
||||
|
||||
if forward_port in forward_list:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def get_enabled_permanent(self, port, proto, toport, toaddr, timeout):
|
||||
forward_port = (port, proto, toport, toaddr)
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
|
||||
if forward_port in fw_settings.getForwardPorts():
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def set_enabled_immediate(self, port, proto, toport, toaddr, timeout):
|
||||
self.fw.addForwardPort(self.zone, port, proto, toport, toaddr, timeout)
|
||||
|
||||
def set_enabled_permanent(self, port, proto, toport, toaddr, timeout):
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
fw_settings.addForwardPort(port, proto, toport, toaddr)
|
||||
self.update_fw_settings(fw_zone, fw_settings)
|
||||
|
||||
def set_disabled_immediate(self, port, proto, toport, toaddr, timeout):
|
||||
self.fw.removeForwardPort(self.zone, port, proto, toport, toaddr)
|
||||
|
||||
def set_disabled_permanent(self, port, proto, toport, toaddr, timeout):
|
||||
fw_zone, fw_settings = self.get_fw_zone_settings()
|
||||
fw_settings.removeForwardPort(port, proto, toport, toaddr)
|
||||
self.update_fw_settings(fw_zone, fw_settings)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
module = AnsibleModule(
|
||||
@@ -625,6 +761,7 @@ def main():
|
||||
icmp_block_inversion=dict(type='str'),
|
||||
service=dict(type='str'),
|
||||
port=dict(type='str'),
|
||||
port_forward=dict(type='list', elements='dict'),
|
||||
rich_rule=dict(type='str'),
|
||||
zone=dict(type='str'),
|
||||
immediate=dict(type='bool', default=False),
|
||||
@@ -635,10 +772,12 @@ def main():
|
||||
interface=dict(type='str'),
|
||||
masquerade=dict(type='str'),
|
||||
offline=dict(type='bool'),
|
||||
target=dict(type='str', choices=['default', 'ACCEPT', 'DROP', 'REJECT']),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
required_by=dict(
|
||||
interface=('zone',),
|
||||
target=('zone',),
|
||||
source=('permanent',),
|
||||
),
|
||||
)
|
||||
@@ -670,6 +809,7 @@ def main():
|
||||
rich_rule = module.params['rich_rule']
|
||||
source = module.params['source']
|
||||
zone = module.params['zone']
|
||||
target = module.params['target']
|
||||
|
||||
if module.params['port'] is not None:
|
||||
if '/' in module.params['port']:
|
||||
@@ -681,6 +821,21 @@ def main():
|
||||
else:
|
||||
port = None
|
||||
|
||||
port_forward_toaddr = ''
|
||||
port_forward = None
|
||||
if module.params['port_forward'] is not None:
|
||||
if len(module.params['port_forward']) > 1:
|
||||
module.fail_json(msg='Only one port forward supported at a time')
|
||||
port_forward = module.params['port_forward'][0]
|
||||
if 'port' not in port_forward:
|
||||
module.fail_json(msg='port must be specified for port forward')
|
||||
if 'proto' not in port_forward:
|
||||
module.fail_json(msg='proto udp/tcp must be specified for port forward')
|
||||
if 'toport' not in port_forward:
|
||||
module.fail_json(msg='toport must be specified for port forward')
|
||||
if 'toaddr' in port_forward:
|
||||
port_forward_toaddr = port_forward['toaddr']
|
||||
|
||||
modification_count = 0
|
||||
if icmp_block is not None:
|
||||
modification_count += 1
|
||||
@@ -690,6 +845,8 @@ def main():
|
||||
modification_count += 1
|
||||
if port is not None:
|
||||
modification_count += 1
|
||||
if port_forward is not None:
|
||||
modification_count += 1
|
||||
if rich_rule is not None:
|
||||
modification_count += 1
|
||||
if interface is not None:
|
||||
@@ -698,12 +855,14 @@ def main():
|
||||
modification_count += 1
|
||||
if source is not None:
|
||||
modification_count += 1
|
||||
if target is not None:
|
||||
modification_count += 1
|
||||
|
||||
if modification_count > 1:
|
||||
module.fail_json(
|
||||
msg='can only operate on port, service, rich_rule, masquerade, icmp_block, icmp_block_inversion, interface or source at once'
|
||||
)
|
||||
elif modification_count > 0 and desired_state in ['absent', 'present']:
|
||||
elif (modification_count > 0) and (desired_state in ['absent', 'present']) and (target is None):
|
||||
module.fail_json(
|
||||
msg='absent and present state can only be used in zone level operations'
|
||||
)
|
||||
@@ -790,6 +949,29 @@ def main():
|
||||
)
|
||||
)
|
||||
|
||||
if port_forward is not None:
|
||||
transaction = ForwardPortTransaction(
|
||||
module,
|
||||
action_args=(str(port_forward['port']), port_forward['proto'],
|
||||
str(port_forward['toport']), port_forward_toaddr, timeout),
|
||||
zone=zone,
|
||||
desired_state=desired_state,
|
||||
permanent=permanent,
|
||||
immediate=immediate
|
||||
)
|
||||
|
||||
changed, transaction_msgs = transaction.run()
|
||||
msgs = msgs + transaction_msgs
|
||||
if changed is True:
|
||||
msgs.append(
|
||||
"Changed port_forward %s to %s" % (
|
||||
"port=%s:proto=%s:toport=%s:toaddr=%s" % (
|
||||
port_forward['port'], port_forward['proto'],
|
||||
port_forward['toport'], port_forward_toaddr
|
||||
), desired_state
|
||||
)
|
||||
)
|
||||
|
||||
if rich_rule is not None:
|
||||
|
||||
transaction = RichRuleTransaction(
|
||||
@@ -834,6 +1016,20 @@ def main():
|
||||
changed, transaction_msgs = transaction.run()
|
||||
msgs = msgs + transaction_msgs
|
||||
|
||||
if target is not None:
|
||||
|
||||
transaction = ZoneTargetTransaction(
|
||||
module,
|
||||
action_args=(target,),
|
||||
zone=zone,
|
||||
desired_state=desired_state,
|
||||
permanent=permanent,
|
||||
immediate=immediate,
|
||||
)
|
||||
|
||||
changed, transaction_msgs = transaction.run()
|
||||
msgs = msgs + transaction_msgs
|
||||
|
||||
''' If there are no changes within the zone we are operating on the zone itself '''
|
||||
if modification_count == 0 and desired_state in ['absent', 'present']:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: seboolean
|
||||
short_description: Toggles SELinux booleans
|
||||
@@ -19,6 +19,7 @@ options:
|
||||
description:
|
||||
- Name of the boolean to configure.
|
||||
required: true
|
||||
type: str
|
||||
persistent:
|
||||
description:
|
||||
- Set to C(yes) if the boolean setting should survive a reboot.
|
||||
|
||||
@@ -20,17 +20,20 @@ version_added: "1.0.0"
|
||||
options:
|
||||
policy:
|
||||
description:
|
||||
- The name of the SELinux policy to use (e.g. C(targeted)) will be required if state is not C(disabled).
|
||||
- The name of the SELinux policy to use (e.g. C(targeted)) will be required if I(state) is not C(disabled).
|
||||
type: str
|
||||
state:
|
||||
description:
|
||||
- The SELinux mode.
|
||||
required: true
|
||||
choices: [ disabled, enforcing, permissive ]
|
||||
type: str
|
||||
configfile:
|
||||
description:
|
||||
- The path to the SELinux configuration file, if non-standard.
|
||||
default: /etc/selinux/config
|
||||
aliases: [ conf, file ]
|
||||
type: str
|
||||
requirements: [ libselinux-python ]
|
||||
author:
|
||||
- Derek Carter (@goozbach) <goozbach@friocorte.com>
|
||||
@@ -178,7 +181,7 @@ def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
policy=dict(type='str'),
|
||||
state=dict(type='str', required='True', choices=['enforcing', 'permissive', 'disabled']),
|
||||
state=dict(type='str', required=True, choices=['enforcing', 'permissive', 'disabled']),
|
||||
configfile=dict(type='str', default='/etc/selinux/config', aliases=['conf', 'file']),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
|
||||
@@ -138,7 +138,17 @@ options:
|
||||
default: yes
|
||||
use_ssh_args:
|
||||
description:
|
||||
- Use the ssh_args specified in ansible.cfg.
|
||||
- Use the ssh_args specified in ansible.cfg. Setting this to `yes` will also make `synchronize` use `ansible_ssh_common_args`.
|
||||
type: bool
|
||||
default: no
|
||||
ssh_connection_multiplexing:
|
||||
description:
|
||||
- SSH connection multiplexing for rsync is disabled by default to prevent misconfigured ControlSockets from resulting in failed SSH connections.
|
||||
This is accomplished by setting the SSH C(ControlSocket) to C(none).
|
||||
- Set this option to C(yes) to allow multiplexing and reduce SSH connection overhead.
|
||||
- Note that simply setting this option to C(yes) is not enough;
|
||||
You must also configure SSH connection multiplexing in your SSH client config by setting values for
|
||||
C(ControlMaster), C(ControlPersist) and C(ControlPath).
|
||||
type: bool
|
||||
default: no
|
||||
rsync_opts:
|
||||
@@ -147,6 +157,7 @@ options:
|
||||
- Note that an empty string in C(rsync_opts) will end up transfer the current working directory.
|
||||
type: list
|
||||
default:
|
||||
elements: str
|
||||
partial:
|
||||
description:
|
||||
- Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.
|
||||
@@ -166,6 +177,8 @@ options:
|
||||
- Add a destination to hard link against during the rsync.
|
||||
type: list
|
||||
default:
|
||||
elements: str
|
||||
|
||||
notes:
|
||||
- rsync must be installed on both the local and remote host.
|
||||
- For the C(synchronize) module, the "local host" is the host `the synchronize task originates on`, and the "destination host" is the host
|
||||
@@ -314,7 +327,7 @@ EXAMPLES = r'''
|
||||
# Specify the rsync binary to use on remote host and on local host
|
||||
- hosts: groupofhosts
|
||||
vars:
|
||||
ansible_rsync_path: /usr/gnu/bin/rsync
|
||||
ansible_rsync_path: /usr/gnu/bin/rsync
|
||||
|
||||
tasks:
|
||||
- name: copy /tmp/localpath/ to remote location /tmp/remotepath
|
||||
@@ -390,12 +403,13 @@ def main():
|
||||
group=dict(type='bool'),
|
||||
set_remote_user=dict(type='bool', default=True),
|
||||
rsync_timeout=dict(type='int', default=0),
|
||||
rsync_opts=dict(type='list', default=[]),
|
||||
rsync_opts=dict(type='list', default=[], elements='str'),
|
||||
ssh_args=dict(type='str'),
|
||||
ssh_connection_multiplexing=dict(type='bool', default=False),
|
||||
partial=dict(type='bool', default=False),
|
||||
verify_host=dict(type='bool', default=False),
|
||||
mode=dict(type='str', default='push', choices=['pull', 'push']),
|
||||
link_dest=dict(type='list')
|
||||
link_dest=dict(type='list', elements='str'),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
@@ -432,6 +446,7 @@ def main():
|
||||
group = module.params['group']
|
||||
rsync_opts = module.params['rsync_opts']
|
||||
ssh_args = module.params['ssh_args']
|
||||
ssh_connection_multiplexing = module.params['ssh_connection_multiplexing']
|
||||
verify_host = module.params['verify_host']
|
||||
link_dest = module.params['link_dest']
|
||||
|
||||
@@ -507,7 +522,9 @@ def main():
|
||||
|
||||
# if the user has not supplied an --rsh option go ahead and add ours
|
||||
if not has_rsh:
|
||||
ssh_cmd = [module.get_bin_path('ssh', required=True), '-S', 'none']
|
||||
ssh_cmd = [module.get_bin_path('ssh', required=True)]
|
||||
if not ssh_connection_multiplexing:
|
||||
ssh_cmd.extend(['-S', 'none'])
|
||||
if private_key is not None:
|
||||
ssh_cmd.extend(['-i', private_key])
|
||||
# If the user specified a port value
|
||||
|
||||
@@ -9,7 +9,7 @@ from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: sysctl
|
||||
short_description: Manage entries in sysctl.conf.
|
||||
@@ -19,18 +19,21 @@ version_added: "1.0.0"
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
- The dot-separated path (aka I(key)) specifying the sysctl variable.
|
||||
- The dot-separated path (also known as I(key)) specifying the sysctl variable.
|
||||
required: true
|
||||
aliases: [ 'key' ]
|
||||
type: str
|
||||
value:
|
||||
description:
|
||||
- Desired value of the sysctl key.
|
||||
aliases: [ 'val' ]
|
||||
type: str
|
||||
state:
|
||||
description:
|
||||
- Whether the entry should be present or absent in the sysctl file.
|
||||
choices: [ "present", "absent" ]
|
||||
default: present
|
||||
type: str
|
||||
ignoreerrors:
|
||||
description:
|
||||
- Use this option to ignore errors about unknown keys.
|
||||
@@ -47,12 +50,14 @@ options:
|
||||
description:
|
||||
- Specifies the absolute path to C(sysctl.conf), if not C(/etc/sysctl.conf).
|
||||
default: /etc/sysctl.conf
|
||||
type: path
|
||||
sysctl_set:
|
||||
description:
|
||||
- Verify token value with the sysctl command and set with -w if necessary
|
||||
type: bool
|
||||
default: 'no'
|
||||
author: "David CHANIAL (@davixx) <david.chanial@gmail.com>"
|
||||
author:
|
||||
- David CHANIAL (@davixx)
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
@@ -182,12 +187,12 @@ class SysctlModule(object):
|
||||
|
||||
# Do the work
|
||||
if not self.module.check_mode:
|
||||
if self.set_proc:
|
||||
self.set_token_value(self.args['name'], self.args['value'])
|
||||
if self.write_file:
|
||||
self.write_sysctl()
|
||||
if self.changed and self.args['reload']:
|
||||
self.reload_sysctl()
|
||||
if self.set_proc:
|
||||
self.set_token_value(self.args['name'], self.args['value'])
|
||||
|
||||
def _values_is_equal(self, a, b):
|
||||
"""Expects two string values. It will split the string by whitespace
|
||||
|
||||
@@ -22,7 +22,7 @@ matrix:
|
||||
- env: T=2.9/linux/opensuse15/1
|
||||
- env: T=2.9/linux/ubuntu1604/1
|
||||
- env: T=2.9/linux/ubuntu1804/1
|
||||
- env: T=2.10/aix/7.2/1
|
||||
# - env: T=2.10/aix/7.2/1
|
||||
- env: T=2.10/osx/10.11/1
|
||||
- env: T=2.10/rhel/7.6/1
|
||||
- env: T=2.10/rhel/8.2/1
|
||||
@@ -37,7 +37,7 @@ matrix:
|
||||
- env: T=2.10/linux/opensuse15/1
|
||||
- env: T=2.10/linux/ubuntu1604/1
|
||||
- env: T=2.10/linux/ubuntu1804/1
|
||||
- env: T=devel/aix/7.2/1
|
||||
# - env: T=devel/aix/7.2/1
|
||||
- env: T=devel/osx/10.11/1
|
||||
- env: T=devel/rhel/7.6/1
|
||||
- env: T=devel/rhel/8.1/1
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
# Test playbook for the firewalld module - port operations
|
||||
# (c) 2017, Adam Miller <admiller@redhat.com>
|
||||
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
- name: firewalld port forward test permanent enabled
|
||||
firewalld:
|
||||
port_forward:
|
||||
- port: 8080
|
||||
proto: tcp
|
||||
toport: 8081
|
||||
permanent: true
|
||||
state: enabled
|
||||
register: result
|
||||
|
||||
- name: assert firewalld port test permanent enabled worked
|
||||
assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: firewalld port test permanent enabled rerun (verify not changed)
|
||||
firewalld:
|
||||
port_forward:
|
||||
- port: 8080
|
||||
proto: tcp
|
||||
toport: 8081
|
||||
permanent: true
|
||||
state: enabled
|
||||
register: result
|
||||
|
||||
- name: assert firewalld port test permanent enabled rerun worked (verify not changed)
|
||||
assert:
|
||||
that:
|
||||
- result is not changed
|
||||
|
||||
- name: firewalld port test permanent disabled
|
||||
firewalld:
|
||||
port_forward:
|
||||
- port: 8080
|
||||
proto: tcp
|
||||
toport: 8081
|
||||
permanent: true
|
||||
state: disabled
|
||||
register: result
|
||||
|
||||
- name: assert firewalld port test permanent disabled worked
|
||||
assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: firewalld port test permanent disabled rerun (verify not changed)
|
||||
firewalld:
|
||||
port_forward:
|
||||
- port: 8080
|
||||
proto: tcp
|
||||
toport: 8081
|
||||
permanent: true
|
||||
state: disabled
|
||||
register: result
|
||||
|
||||
- name: assert firewalld port test permanent disabled rerun worked (verify not changed)
|
||||
assert:
|
||||
that:
|
||||
- result is not changed
|
||||
@@ -33,3 +33,6 @@
|
||||
|
||||
# firewalld source operation test cases
|
||||
- import_tasks: source_test_cases.yml
|
||||
|
||||
# firewalld zone target operation test cases
|
||||
- import_tasks: zone_target_test_cases.yml
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# Test playbook for the firewalld module - source operations
|
||||
# (c) 2020, Adam Miller <admiller@redhat.com>
|
||||
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
- name: firewalld dmz zone target DROP
|
||||
firewalld:
|
||||
zone: dmz
|
||||
permanent: True
|
||||
state: present
|
||||
target: DROP
|
||||
register: result
|
||||
|
||||
- name: assert firewalld dmz zone target DROP present worked
|
||||
assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: firewalld dmz zone target DROP rerun (verify not changed)
|
||||
firewalld:
|
||||
zone: dmz
|
||||
permanent: True
|
||||
state: present
|
||||
target: DROP
|
||||
register: result
|
||||
|
||||
- name: assert firewalld dmz zone target DROP present worked (verify not changed)
|
||||
assert:
|
||||
that:
|
||||
- result is not changed
|
||||
|
||||
- name: firewalld dmz zone target DROP absent
|
||||
firewalld:
|
||||
zone: dmz
|
||||
permanent: True
|
||||
state: absent
|
||||
target: DROP
|
||||
register: result
|
||||
|
||||
- name: assert firewalld dmz zone target DROP absent worked
|
||||
assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: firewalld dmz zone target DROP rerun (verify not changed)
|
||||
firewalld:
|
||||
zone: dmz
|
||||
permanent: True
|
||||
state: absent
|
||||
target: DROP
|
||||
register: result
|
||||
|
||||
- name: assert firewalld dmz zone target DROP present worked (verify not changed)
|
||||
assert:
|
||||
that:
|
||||
- result is not changed
|
||||
@@ -48,9 +48,17 @@
|
||||
var: _disable_test1
|
||||
verbosity: 1
|
||||
|
||||
- name: Before gathering the fact
|
||||
debug:
|
||||
msg: "{{ ansible_selinux }}"
|
||||
|
||||
- name: TEST 1 | Re-gather facts
|
||||
setup:
|
||||
|
||||
- name: After gathering the fact
|
||||
debug:
|
||||
msg: "{{ ansible_selinux }}"
|
||||
|
||||
- name: TEST 1 | Assert that status was changed, reboot_required is True, a warning was displayed, and SELinux is configured properly
|
||||
assert:
|
||||
that:
|
||||
@@ -74,7 +82,7 @@
|
||||
var: _disable_test2
|
||||
verbosity: 1
|
||||
|
||||
- name: TEST 1 | Assert that no change is reported, a warnking was dispalyed, and reboot_required is True
|
||||
- name: TEST 1 | Assert that no change is reported, a warning was displayed, and reboot_required is True
|
||||
assert:
|
||||
that:
|
||||
- _disable_test2 is not changed
|
||||
@@ -147,7 +155,7 @@
|
||||
var: _state_test2
|
||||
verbosity: 1
|
||||
|
||||
- name: TEST 2 | Assert that no change was reported, no warnings were dispalyed, and reboot_required is False
|
||||
- name: TEST 2 | Assert that no change was reported, no warnings were displayed, and reboot_required is False
|
||||
assert:
|
||||
that:
|
||||
- _state_test2 is not changed
|
||||
@@ -380,7 +388,7 @@
|
||||
var: _lineinfile_out1
|
||||
verbosity: 1
|
||||
|
||||
- name: TEST 5 | Set SELinux to enforcing
|
||||
- name: TEST 5 | Set SELinux to enforcing
|
||||
selinux:
|
||||
state: enforcing
|
||||
policy: targeted
|
||||
|
||||
@@ -289,3 +289,24 @@
|
||||
- sysctl_check_mode2 is changed
|
||||
- "'vm.swappiness=22' in sysctl_check_mode_conf_content.stdout_lines"
|
||||
- sysctl_check_mode_current_vm_swappiness.stdout == '22'
|
||||
|
||||
# Test sysctl: invalid value
|
||||
- name: Set invalid sysctl property using module
|
||||
sysctl:
|
||||
name: vm.mmap_rnd_bits
|
||||
value: '1024'
|
||||
state: present
|
||||
reload: yes
|
||||
sysctl_set: True
|
||||
ignore_errors: True
|
||||
register: sysctl_invalid_set1
|
||||
|
||||
- name: Read /etc/sysctl.conf
|
||||
command: 'cat /etc/sysctl.conf'
|
||||
register: sysctl_invalid_conf_content
|
||||
|
||||
- name: Ensure changes were not made
|
||||
assert:
|
||||
that:
|
||||
- sysctl_invalid_set1 is failed
|
||||
- "'vm.mmap_rnd_bits' not in sysctl_invalid_conf_content.stdout"
|
||||
|
||||
@@ -1,34 +1,8 @@
|
||||
plugins/module_utils/firewalld.py future-import-boilerplate
|
||||
plugins/module_utils/firewalld.py metaclass-boilerplate
|
||||
plugins/module_utils/mount.py future-import-boilerplate
|
||||
plugins/module_utils/mount.py metaclass-boilerplate
|
||||
plugins/modules/acl.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/patch.py pylint:blacklisted-name
|
||||
plugins/modules/synchronize.py pylint:blacklisted-name
|
||||
plugins/modules/synchronize.py use-argspec-type-path
|
||||
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||
plugins/modules/synchronize.py validate-modules:parameter-list-no-elements
|
||||
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||
plugins/modules/at.py validate-modules:doc-required-mismatch
|
||||
plugins/modules/authorized_key.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/seboolean.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/selinux.py validate-modules:invalid-ansiblemodule-schema
|
||||
plugins/modules/selinux.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/sysctl.py validate-modules:doc-missing-type
|
||||
plugins/modules/sysctl.py validate-modules:parameter-type-not-in-doc
|
||||
tests/unit/mock/path.py future-import-boilerplate
|
||||
tests/unit/mock/path.py metaclass-boilerplate
|
||||
tests/unit/mock/yaml_helper.py future-import-boilerplate
|
||||
tests/unit/mock/yaml_helper.py metaclass-boilerplate
|
||||
tests/unit/modules/conftest.py future-import-boilerplate
|
||||
tests/unit/modules/conftest.py metaclass-boilerplate
|
||||
tests/unit/modules/system/test_mount.py future-import-boilerplate
|
||||
tests/unit/modules/system/test_mount.py metaclass-boilerplate
|
||||
tests/unit/modules/utils.py future-import-boilerplate
|
||||
tests/unit/modules/utils.py metaclass-boilerplate
|
||||
tests/unit/plugins/action/test_synchronize.py future-import-boilerplate
|
||||
tests/unit/plugins/action/test_synchronize.py metaclass-boilerplate
|
||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||
tests/utils/shippable/timing.py shebang
|
||||
|
||||
8
tests/sanity/ignore-2.11.txt
Normal file
8
tests/sanity/ignore-2.11.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
plugins/modules/synchronize.py pylint:blacklisted-name
|
||||
plugins/modules/synchronize.py use-argspec-type-path
|
||||
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||
tests/utils/shippable/timing.py shebang
|
||||
@@ -1,30 +1,8 @@
|
||||
plugins/module_utils/firewalld.py future-import-boilerplate
|
||||
plugins/module_utils/firewalld.py metaclass-boilerplate
|
||||
plugins/module_utils/mount.py future-import-boilerplate
|
||||
plugins/module_utils/mount.py metaclass-boilerplate
|
||||
plugins/modules/acl.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/synchronize.py pylint:blacklisted-name
|
||||
plugins/modules/synchronize.py use-argspec-type-path
|
||||
plugins/modules/synchronize.py validate-modules:doc-default-does-not-match-spec
|
||||
plugins/modules/synchronize.py validate-modules:nonexistent-parameter-documented
|
||||
plugins/modules/synchronize.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/synchronize.py validate-modules:undocumented-parameter
|
||||
plugins/modules/authorized_key.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/seboolean.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/selinux.py validate-modules:parameter-type-not-in-doc
|
||||
plugins/modules/sysctl.py validate-modules:doc-missing-type
|
||||
plugins/modules/sysctl.py validate-modules:parameter-type-not-in-doc
|
||||
tests/unit/mock/path.py future-import-boilerplate
|
||||
tests/unit/mock/path.py metaclass-boilerplate
|
||||
tests/unit/mock/yaml_helper.py future-import-boilerplate
|
||||
tests/unit/mock/yaml_helper.py metaclass-boilerplate
|
||||
tests/unit/modules/conftest.py future-import-boilerplate
|
||||
tests/unit/modules/conftest.py metaclass-boilerplate
|
||||
tests/unit/modules/system/test_mount.py future-import-boilerplate
|
||||
tests/unit/modules/system/test_mount.py metaclass-boilerplate
|
||||
tests/unit/modules/utils.py future-import-boilerplate
|
||||
tests/unit/modules/utils.py metaclass-boilerplate
|
||||
tests/unit/plugins/action/test_synchronize.py future-import-boilerplate
|
||||
tests/unit/plugins/action/test_synchronize.py metaclass-boilerplate
|
||||
tests/utils/shippable/check_matrix.py replace-urlopen
|
||||
tests/utils/shippable/timing.py shebang
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
packaging # needed for update-bundled and changelog
|
||||
sphinx ; python_version >= '3.5' # docs build requires python 3+
|
||||
sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+
|
||||
straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+
|
||||
@@ -1,3 +1,7 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat.mock import MagicMock
|
||||
from ansible.utils.path import unfrackpath
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import io
|
||||
import yaml
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat import unittest
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
fixtures:
|
||||
taskvars_in: taskvars_in.json
|
||||
taskvars_out: taskvars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
_play_context:
|
||||
private_key_file: ~/test.pem
|
||||
task_args:
|
||||
private_key: ~/.ssh/id_rsa
|
||||
dest: /tmp/deleteme
|
||||
src: /tmp/deleteme
|
||||
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.final_module_args['private_key'] == '~/.ssh/id_rsa'"
|
||||
@@ -0,0 +1,151 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_ssh_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_ssh_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
_task:
|
||||
delegate_to: u1404
|
||||
_play_context:
|
||||
shell: None
|
||||
remote_addr: u1404
|
||||
remote_user: root
|
||||
private_key_file: ~/test.pem
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'ssh'"
|
||||
- "self._play_context.shell == None"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.final_module_args['private_key'] == '~/test.pem'"
|
||||
@@ -0,0 +1,379 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_ssh_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_ssh_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
private_key: ~/.ssh/id_rsa
|
||||
_task:
|
||||
delegate_to: u1404
|
||||
_play_context:
|
||||
shell: None
|
||||
remote_addr: u1404
|
||||
remote_user: root
|
||||
private_key_file: ~/test.pem
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'ssh'"
|
||||
- "self._play_context.shell == None"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.final_module_args['private_key'] == '~/.ssh/id_rsa'"
|
||||
@@ -0,0 +1,379 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_ssh_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_ssh_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_ssh_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_ssh_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
'''
|
||||
(Epdb) pprint(DeepDiff(self.final_task_vars, out_task_vars), indent=2)
|
||||
{ 'dic_item_added': set([u"root['ansible_python_interpreter']"]),
|
||||
@@ -251,6 +255,23 @@ class TestSynchronizeAction(unittest.TestCase):
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_su'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_with_private_key(self):
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_with_private_key'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_delegate_remote_with_private_key(self):
|
||||
# delegate to other remote host and use the module param private_key
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_with_private_key'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_delegate_remote_play_context_private_key(self):
|
||||
# delegate to other remote host and use the play context private_key
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_play_context_private_key'))
|
||||
|
||||
@patch.object(ActionModule, '_low_level_execute_command', side_effect=BreakPoint)
|
||||
@patch.object(ActionModule, '_remote_expand_user', side_effect=ActionModule._remote_expand_user, autospec=True)
|
||||
def test_remote_user_not_in_local_tmpdir(self, spy_remote_expand_user, ll_ec):
|
||||
|
||||
1
tests/utils/shippable/macos.sh
Symbolic link
1
tests/utils/shippable/macos.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
remote.sh
|
||||
@@ -14,13 +14,16 @@ function join {
|
||||
echo "$*";
|
||||
}
|
||||
|
||||
# Ensure we can write other collections to this dir
|
||||
sudo chown "$(whoami)" "${PWD}/../../"
|
||||
|
||||
test="$(join / "${args[@]:1}")"
|
||||
|
||||
docker images ansible/ansible
|
||||
docker images quay.io/ansible/*
|
||||
docker ps
|
||||
|
||||
for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v '^drydock/' | sed 's/^.* //'); do
|
||||
for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v -e '^drydock/' -e '^quay.io/ansible/azure-pipelines-test-container:' | sed 's/^.* //'); do
|
||||
docker rm -f "${container}" || true # ignore errors
|
||||
done
|
||||
|
||||
@@ -59,12 +62,16 @@ else
|
||||
retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check
|
||||
fi
|
||||
|
||||
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
|
||||
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
|
||||
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
|
||||
mkdir -p "${TEST_DIR}"
|
||||
cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
|
||||
cd "${TEST_DIR}"
|
||||
if [ "${SHIPPABLE_BUILD_ID:-}" ]; then
|
||||
export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible"
|
||||
SHIPPABLE_RESULT_DIR="$(pwd)/shippable"
|
||||
TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
|
||||
mkdir -p "${TEST_DIR}"
|
||||
cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
|
||||
cd "${TEST_DIR}"
|
||||
else
|
||||
export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../"
|
||||
fi
|
||||
|
||||
# START: HACK install dependencies
|
||||
retry ansible-galaxy collection install community.general
|
||||
@@ -142,8 +149,10 @@ function cleanup
|
||||
ansible-test coverage xml --color --requirements --group-by command --group-by version ${stub:+"$stub"}
|
||||
cp -a tests/output/reports/coverage=*.xml "$SHIPPABLE_RESULT_DIR/codecoverage/"
|
||||
|
||||
# analyze and capture code coverage aggregated by integration test target
|
||||
ansible-test coverage analyze targets generate -v "$SHIPPABLE_RESULT_DIR/testresults/coverage-analyze-targets.json"
|
||||
if ! [[ "${ansible_version}" =~ 2.9 ]]; then
|
||||
# analyze and capture code coverage aggregated by integration test target
|
||||
ansible-test coverage analyze targets generate -v "$SHIPPABLE_RESULT_DIR/testresults/coverage-analyze-targets.json"
|
||||
fi
|
||||
|
||||
# upload coverage report to codecov.io only when using complete on-demand coverage
|
||||
if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ]; then
|
||||
@@ -185,7 +194,7 @@ function cleanup
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
if [ "${SHIPPABLE_BUILD_ID:-}" ]; then trap cleanup EXIT; fi
|
||||
|
||||
if [[ "${COVERAGE:-}" == "--coverage" ]]; then
|
||||
timeout=60
|
||||
@@ -195,5 +204,5 @@ fi
|
||||
|
||||
ansible-test env --dump --show --timeout "${timeout}" --color -v
|
||||
|
||||
"tests/utils/shippable/check_matrix.py"
|
||||
if [ "${SHIPPABLE_BUILD_ID:-}" ]; then "tests/utils/shippable/check_matrix.py"; fi
|
||||
"tests/utils/shippable/${script}.sh" "${test}"
|
||||
|
||||
Reference in New Issue
Block a user