mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 18:36:28 +00:00
Compare commits
432 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d472953e10 | ||
|
|
c78d6c95d6 | ||
|
|
c9cb987eb7 | ||
|
|
099a99d288 | ||
|
|
26ea01d5b4 | ||
|
|
a9afbe59e5 | ||
|
|
dc9cab36ac | ||
|
|
99265c5126 | ||
|
|
57aede6b95 | ||
|
|
e51e41203a | ||
|
|
54644179ea | ||
|
|
7d6a1a4483 | ||
|
|
2715e4456c | ||
|
|
a335d1cc56 | ||
|
|
a89b43b110 | ||
|
|
1b599bde37 | ||
|
|
7bd987e2b9 | ||
|
|
8b0896a43d | ||
|
|
402bb01501 | ||
|
|
75afd83508 | ||
|
|
b25f0f3cd2 | ||
|
|
9226c4b0d5 | ||
|
|
fe3e262209 | ||
|
|
b9fac26dcd | ||
|
|
343e5a03a7 | ||
|
|
acea082a7c | ||
|
|
0cff1f116f | ||
|
|
bac14c2f01 | ||
|
|
291ceffecb | ||
|
|
623817b0b7 | ||
|
|
6df7fd3026 | ||
|
|
95531d24ea | ||
|
|
848d63fa38 | ||
|
|
b29af922eb | ||
|
|
9822d8172b | ||
|
|
08f10d5758 | ||
|
|
bc5dde0e25 | ||
|
|
233617fdfa | ||
|
|
15e9f04f86 | ||
|
|
2be739ef05 | ||
|
|
4a1d86c47e | ||
|
|
041824b98e | ||
|
|
f5ed0689c1 | ||
|
|
1beabef60e | ||
|
|
d40dece6c5 | ||
|
|
0f6bf38573 | ||
|
|
87423f4a33 | ||
|
|
748fb40541 | ||
|
|
eb2369a934 | ||
|
|
80cd8329e0 | ||
|
|
669b7bf090 | ||
|
|
c207b7298c | ||
|
|
d7aabcceed | ||
|
|
7ac467a359 | ||
|
|
52cce0b7af | ||
|
|
09d68678ee | ||
|
|
ee6baa30cf | ||
|
|
bc43694ca9 | ||
|
|
a86195623b | ||
|
|
9e76fdc668 | ||
|
|
64c4548b7f | ||
|
|
a0c8a3034a | ||
|
|
4c4a6ab27c | ||
|
|
2c3efea14b | ||
|
|
831a4962c1 | ||
|
|
8e45b96a33 | ||
|
|
c055340ecb | ||
|
|
c034e8c04f | ||
|
|
41cfdda6a3 | ||
|
|
8b92e0454d | ||
|
|
f62b8027e0 | ||
|
|
a424ee71e3 | ||
|
|
4c6e2f2a40 | ||
|
|
151551b04f | ||
|
|
b31de003bd | ||
|
|
7f76d8aff4 | ||
|
|
f420e8f02e | ||
|
|
d0b07885f0 | ||
|
|
c1b5b51366 | ||
|
|
25aec0d712 | ||
|
|
17f905eb35 | ||
|
|
c5f0c34190 | ||
|
|
24c66fcc43 | ||
|
|
5e23f01a76 | ||
|
|
74ba307777 | ||
|
|
a1c03a3cfe | ||
|
|
6b852d841f | ||
|
|
c6ec384c24 | ||
|
|
65a8dbad8d | ||
|
|
171bc087cf | ||
|
|
786f082976 | ||
|
|
3cde447eb8 | ||
|
|
e2bd4b34ed | ||
|
|
a5f11b085b | ||
|
|
d0fb125586 | ||
|
|
ba28da9b62 | ||
|
|
cca84abeb5 | ||
|
|
d2ee51253d | ||
|
|
706195fb02 | ||
|
|
a7a74a6eb7 | ||
|
|
097aebadb0 | ||
|
|
e3d36a3408 | ||
|
|
22c04d54f2 | ||
|
|
11300507d0 | ||
|
|
53c0c83522 | ||
|
|
35cee20a6c | ||
|
|
72ca27a6ae | ||
|
|
99b7573dfb | ||
|
|
1f61ccc80c | ||
|
|
16cd8e49d2 | ||
|
|
114bd75c89 | ||
|
|
21681daa01 | ||
|
|
ebb4600618 | ||
|
|
60c9642e6b | ||
|
|
832dd55144 | ||
|
|
9142c75c84 | ||
|
|
5269213907 | ||
|
|
ae3fde2647 | ||
|
|
7e17b55884 | ||
|
|
4c42d0971f | ||
|
|
ced14746a8 | ||
|
|
4399759cf3 | ||
|
|
a33d0a55e7 | ||
|
|
650ae65f24 | ||
|
|
004eb6992f | ||
|
|
72e5a7dba2 | ||
|
|
a6c225e4a0 | ||
|
|
c3595abcf0 | ||
|
|
e54dd3a01f | ||
|
|
42c5cdf01a | ||
|
|
42a43586f1 | ||
|
|
8b773e13ff | ||
|
|
e78ac2849f | ||
|
|
67ae100cee | ||
|
|
9e28f3cceb | ||
|
|
ab5533022e | ||
|
|
498ace1210 | ||
|
|
1d1f7ec582 | ||
|
|
25123eafc7 | ||
|
|
16ce942448 | ||
|
|
54014529bd | ||
|
|
02a032aa45 | ||
|
|
09e2b89d5b | ||
|
|
736f2ecac0 | ||
|
|
a3953106e6 | ||
|
|
9f9d160ad1 | ||
|
|
f16a93f976 | ||
|
|
7ef43c60df | ||
|
|
ffd107db4d | ||
|
|
e5bb9dab9d | ||
|
|
e4522e1517 | ||
|
|
18f5d53078 | ||
|
|
287abb749c | ||
|
|
1c97afd40a | ||
|
|
b54ddaa28c | ||
|
|
5324b98e8f | ||
|
|
682d48e721 | ||
|
|
6c59811bf9 | ||
|
|
689a25edcf | ||
|
|
c718a610cf | ||
|
|
58eba98de9 | ||
|
|
2aaab59d04 | ||
|
|
8d80ffd8ca | ||
|
|
94ee25cace | ||
|
|
fafcd5f755 | ||
|
|
f9589d78a8 | ||
|
|
c081bb6c9c | ||
|
|
31ffc68980 | ||
|
|
2aa84f07f1 | ||
|
|
48409f6584 | ||
|
|
3044c0288f | ||
|
|
7bdd78b053 | ||
|
|
519162443f | ||
|
|
7fd989f7f0 | ||
|
|
cc3c9cb35b | ||
|
|
e2b6a71079 | ||
|
|
8635cd84d4 | ||
|
|
e47da0f512 | ||
|
|
5552c6e94f | ||
|
|
ab26dc8fa1 | ||
|
|
423a7f122a | ||
|
|
8d6d292358 | ||
|
|
42c3d3aac7 | ||
|
|
647abcb390 | ||
|
|
1a13287788 | ||
|
|
77c29a1542 | ||
|
|
a0c5580fc3 | ||
|
|
116978abca | ||
|
|
13c0639d9d | ||
|
|
1a0a185ac3 | ||
|
|
c2bf9ea9fb | ||
|
|
f81e562301 | ||
|
|
3a75f85bdd | ||
|
|
9de5c0c53c | ||
|
|
317532f8bd | ||
|
|
5cfb9b2807 | ||
|
|
599fc7f17b | ||
|
|
7c6d22efba | ||
|
|
694546d784 | ||
|
|
15a7248550 | ||
|
|
07a141fc85 | ||
|
|
fcca0fdfc2 | ||
|
|
b5459d6316 | ||
|
|
ba2d97f067 | ||
|
|
9e62a0abb9 | ||
|
|
e65efba8b2 | ||
|
|
3ff7a0baf2 | ||
|
|
b00ee3b807 | ||
|
|
ece18b756b | ||
|
|
1774352313 | ||
|
|
d1798d3056 | ||
|
|
eb941c30b4 | ||
|
|
4e7732586f | ||
|
|
6bb6089999 | ||
|
|
7bb36d62d0 | ||
|
|
f585aa065a | ||
|
|
651065bc03 | ||
|
|
820eea3d19 | ||
|
|
bf5856b10c | ||
|
|
b41b46593e | ||
|
|
7b2ad8a80c | ||
|
|
6fca49f445 | ||
|
|
49f56697bb | ||
|
|
1a87822704 | ||
|
|
72fe304b8f | ||
|
|
b52a6010b6 | ||
|
|
c5b2954c30 | ||
|
|
397920c7a2 | ||
|
|
0399127d11 | ||
|
|
801b1edcbe | ||
|
|
edfbb40731 | ||
|
|
df5b73a21f | ||
|
|
a0a534508a | ||
|
|
dee1e71796 | ||
|
|
aadc6cd66d | ||
|
|
945296f314 | ||
|
|
cd5e3e2d85 | ||
|
|
196d3205ca | ||
|
|
a7c830f49d | ||
|
|
31ba39cac4 | ||
|
|
772bfe9936 | ||
|
|
327832dcbb | ||
|
|
328319b926 | ||
|
|
983d937b7b | ||
|
|
58ed77e851 | ||
|
|
5d226f86b6 | ||
|
|
1bbc88af92 | ||
|
|
4dad1ee6fe | ||
|
|
43c805f7db | ||
|
|
91d4d9d8c6 | ||
|
|
e528474054 | ||
|
|
80d41583d1 | ||
|
|
2e60bdcdfe | ||
|
|
afe2946cce | ||
|
|
31085fffb7 | ||
|
|
fce150fcf7 | ||
|
|
51b8e79203 | ||
|
|
2319d928c4 | ||
|
|
571837b199 | ||
|
|
159e2bb734 | ||
|
|
06769c4e69 | ||
|
|
dae5472206 | ||
|
|
d2b6857cd1 | ||
|
|
acc7bc1ea6 | ||
|
|
156d90ce90 | ||
|
|
f2af41d842 | ||
|
|
55c1ece888 | ||
|
|
85cbc27427 | ||
|
|
5cdb646ab7 | ||
|
|
3552db1cac | ||
|
|
a23e531bdb | ||
|
|
b1308f3404 | ||
|
|
f887aff159 | ||
|
|
f340b39bb9 | ||
|
|
c47a2128ca | ||
|
|
e4dd15a746 | ||
|
|
9ff2c7685f | ||
|
|
043e2e969a | ||
|
|
3599b8afdc | ||
|
|
4af49abd00 | ||
|
|
19cad71f25 | ||
|
|
e6b6c05bf7 | ||
|
|
30e84111f0 | ||
|
|
4c14956280 | ||
|
|
2bc89b56e8 | ||
|
|
6c1c1604fb | ||
|
|
177314321b | ||
|
|
75107c807c | ||
|
|
385d03a629 | ||
|
|
a85b169a0e | ||
|
|
77fe9c82fb | ||
|
|
01eee507f2 | ||
|
|
c68f17f09b | ||
|
|
d6b368e63f | ||
|
|
72eed6a4b6 | ||
|
|
055c18c892 | ||
|
|
8a45044ea7 | ||
|
|
d386506728 | ||
|
|
eaa484eb37 | ||
|
|
5febbca503 | ||
|
|
da4e5d3592 | ||
|
|
c2e37d202a | ||
|
|
61ecc1fee4 | ||
|
|
695eed943b | ||
|
|
61cf2b74c4 | ||
|
|
d31b9dfa99 | ||
|
|
81bf52047a | ||
|
|
546acdaac7 | ||
|
|
cb535e9718 | ||
|
|
5874c89cf7 | ||
|
|
703daa9500 | ||
|
|
23de3feedd | ||
|
|
2d764264c3 | ||
|
|
bb459cb014 | ||
|
|
dee5de23d7 | ||
|
|
3b5520ebf7 | ||
|
|
281549cadc | ||
|
|
dab16b8783 | ||
|
|
5b1652e8fa | ||
|
|
764cae9f33 | ||
|
|
25684ce2d7 | ||
|
|
2eee9f78a6 | ||
|
|
0c0490298f | ||
|
|
5424c47d2f | ||
|
|
afcf87d21f | ||
|
|
e3e6c6167e | ||
|
|
2639d4c023 | ||
|
|
406d3250c4 | ||
|
|
22787e03d4 | ||
|
|
15e961c2ef | ||
|
|
d54581dddc | ||
|
|
3c24d1c03c | ||
|
|
f0391bd58a | ||
|
|
4ad6ff50cd | ||
|
|
2250e47de7 | ||
|
|
fd64cde84a | ||
|
|
ec52007c8d | ||
|
|
6ccf3682ac | ||
|
|
b0b376fce2 | ||
|
|
dccd998be0 | ||
|
|
b161c59a05 | ||
|
|
fab6b980d2 | ||
|
|
4ebb65e6f6 | ||
|
|
6d7f66539c | ||
|
|
dd1bb708d3 | ||
|
|
5fbe8a1f9d | ||
|
|
eb485c5f6f | ||
|
|
20aa1ef55e | ||
|
|
45b171a064 | ||
|
|
63b6b8a9d3 | ||
|
|
c006eb8a5f | ||
|
|
758561070a | ||
|
|
6dd5cb5dea | ||
|
|
1acb4d18e6 | ||
|
|
2f6156b4f5 | ||
|
|
a415ed9b1f | ||
|
|
9d1880f29e | ||
|
|
1625429f74 | ||
|
|
78b628725a | ||
|
|
439492c379 | ||
|
|
11ef03e9dd | ||
|
|
645fe91fa3 | ||
|
|
e33893869a | ||
|
|
7cec9cc972 | ||
|
|
d9420f88bc | ||
|
|
3b1bca1f71 | ||
|
|
76b26de108 | ||
|
|
e2af49efa4 | ||
|
|
422014860b | ||
|
|
c313c825f4 | ||
|
|
8d203225d3 | ||
|
|
d921968504 | ||
|
|
de0409e793 | ||
|
|
07e8911fd8 | ||
|
|
0205adef24 | ||
|
|
74d83d8e94 | ||
|
|
e92f288d5b | ||
|
|
be191cce6c | ||
|
|
ab3c2120fb | ||
|
|
6172e56b62 | ||
|
|
50f8477dbc | ||
|
|
273a678771 | ||
|
|
0026c9f5b2 | ||
|
|
7d8ca8bdbb | ||
|
|
6632c87bb0 | ||
|
|
f2418d343d | ||
|
|
2cb3605617 | ||
|
|
cc2b1e7b6d | ||
|
|
027ffcae56 | ||
|
|
14731bf485 | ||
|
|
775ab35ddd | ||
|
|
8c76619799 | ||
|
|
897c6ad0f2 | ||
|
|
6ab9f071c6 | ||
|
|
3c4e98cce2 | ||
|
|
66267a50b3 | ||
|
|
67bea39474 | ||
|
|
c874089d1d | ||
|
|
4fba692c1b | ||
|
|
5c372e0a7c | ||
|
|
01ae744aa6 | ||
|
|
f799aa8356 | ||
|
|
76880e2403 | ||
|
|
a5627744f1 | ||
|
|
7fa0c20d5d | ||
|
|
eb7d3b2273 | ||
|
|
32a90e59ac | ||
|
|
1c550cd4ef | ||
|
|
07ecfc940c | ||
|
|
25394eeafb | ||
|
|
927d91f35f | ||
|
|
a91ebb4e97 | ||
|
|
7ead1c14fc | ||
|
|
0a710c2a03 | ||
|
|
c012d0fba7 | ||
|
|
676bec5484 | ||
|
|
76e72c44cd | ||
|
|
7e60763ab3 | ||
|
|
344b48c2bf | ||
|
|
bbc96ebb99 | ||
|
|
b7f1f080d6 | ||
|
|
d21e7bd81c | ||
|
|
63ebaab51c | ||
|
|
c6a2559719 | ||
|
|
fdc09fa3fd | ||
|
|
5dbdf14908 | ||
|
|
5d47ab7096 | ||
|
|
1f06a02043 | ||
|
|
fe111b8577 | ||
|
|
24405289fe | ||
|
|
2728cfe59d | ||
|
|
0ffe9fa6c4 |
1119
.github/BOTMETA.yml
vendored
1119
.github/BOTMETA.yml
vendored
File diff suppressed because it is too large
Load Diff
61
.github/settings.yml
vendored
61
.github/settings.yml
vendored
@@ -1,61 +1,6 @@
|
||||
###
|
||||
# https://probot.github.io/apps/settings/
|
||||
#
|
||||
|
||||
# DO NOT MODIFY
|
||||
# this is a copy of https://github.com/gundalow-collection/.github/blob/master/.github/settings.yml
|
||||
# Work around till https://github.com/probot/settings/pull/179 is merged
|
||||
|
||||
# Settings: https://probot.github.io/apps/settings/
|
||||
# Pull settings from https://github.com/ansible-collections/.github/blob/master/.github/settings.yml
|
||||
|
||||
|
||||
repository:
|
||||
# See https://developer.github.com/v3/repos/#edit for all available settings.
|
||||
has_issues: true
|
||||
has_wiki: false
|
||||
has_pages: false
|
||||
default_branch: master
|
||||
allow_squash_merge: true
|
||||
allow_merge_commit: false
|
||||
allow_rebase_merge: true
|
||||
|
||||
# Labels: define labels for Issues and Pull Requests
|
||||
labels:
|
||||
- name: bug
|
||||
color: fbca04
|
||||
description: This issue/PR relates to a bug.
|
||||
- name: feature
|
||||
description: This issue/PR relates to a feature request.
|
||||
color: 006b75
|
||||
- name: migrated_from_ansible_ansible
|
||||
color: 5319e7
|
||||
description: This issue/PR was moved from gh/ansible/ansible
|
||||
|
||||
branches:
|
||||
- name: master
|
||||
# https://developer.github.com/v3/repos/branches/#update-branch-protection
|
||||
# Branch Protection settings. Set to null to disable
|
||||
protection:
|
||||
# Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
|
||||
required_pull_request_reviews:
|
||||
# The number of approvals required. (1-6)
|
||||
required_approving_review_count: 1
|
||||
# Dismiss approved reviews automatically when a new commit is pushed.
|
||||
dismiss_stale_reviews: true
|
||||
# Blocks merge until code owners have reviewed.
|
||||
require_code_owner_reviews: true
|
||||
# Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
|
||||
dismissal_restrictions:
|
||||
users: []
|
||||
teams: []
|
||||
# Required. Require status checks to pass before merging. Set to null to disable
|
||||
required_status_checks:
|
||||
# Required. Require branches to be up to date before merging.
|
||||
strict: true
|
||||
# Required. The list of status checks to require in order to merge into this branch
|
||||
contexts: []
|
||||
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
|
||||
enforce_admins: true
|
||||
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
|
||||
#restrictions:
|
||||
# users: []
|
||||
# teams: []
|
||||
_extends: ".github"
|
||||
|
||||
49
.github/workflows/codeql-analysis.yml
vendored
Normal file
49
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: "Code scanning - action"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '26 19 * * 1'
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
628
CHANGELOG.rst
Normal file
628
CHANGELOG.rst
Normal file
@@ -0,0 +1,628 @@
|
||||
===============================
|
||||
Community General Release Notes
|
||||
===============================
|
||||
|
||||
.. contents:: Topics
|
||||
|
||||
|
||||
v1.1.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Release for Ansible 2.10.0.
|
||||
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- The collection dependencies where adjusted so that ``community.kubernetes`` and ``google.cloud`` are required to be of version 1.0.0 or newer (https://github.com/ansible-collections/community.general/pull/774).
|
||||
- jc - new filter to convert the output of many shell commands and file-types to JSON. Uses the jc library at https://github.com/kellyjonbrazil/jc. For example, filtering the STDOUT output of ``uname -a`` via ``{{ result.stdout | community.general.jc('uname') }}``. Requires Python 3.6+ (https://github.com/ansible-collections/community.general/pull/750).
|
||||
- xfconf - add support for ``double`` type (https://github.com/ansible-collections/community.general/pull/744).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- cobbler inventory plugin - ``name`` needed FQCN (https://github.com/ansible-collections/community.general/pull/722).
|
||||
- dsv lookup - use correct dict usage (https://github.com/ansible-collections/community.general/pull/743).
|
||||
- inventory plugins - allow FQCN in ``plugin`` option (https://github.com/ansible-collections/community.general/pull/722).
|
||||
- ipa_hostgroup - fix an issue with load-balanced ipa and cookie handling with Python 3 (https://github.com/ansible-collections/community.general/issues/737).
|
||||
- oc connection plugin - ``transport`` needed FQCN (https://github.com/ansible-collections/community.general/pull/722).
|
||||
- postgresql_set - allow to pass an empty string to the ``value`` parameter (https://github.com/ansible-collections/community.general/issues/775).
|
||||
- xfconf - make it work in non-english locales (https://github.com/ansible-collections/community.general/pull/744).
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
Cloud
|
||||
~~~~~
|
||||
|
||||
docker
|
||||
^^^^^^
|
||||
|
||||
- docker_stack_task_info - Return information of the tasks on a docker stack
|
||||
|
||||
System
|
||||
~~~~~~
|
||||
|
||||
- iptables_state - Save iptables state into a file or restore it from a file
|
||||
- shutdown - Shut down a machine
|
||||
- sysupgrade - Manage OpenBSD system upgrades
|
||||
|
||||
v1.0.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
This is release 1.0.0 of ``community.general``, released on 2020-07-31.
|
||||
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- Add the ``gcpubsub``, ``gcpubsub_info`` and ``gcpubsub_facts`` (to be removed in 3.0.0) modules. These were originally in community.general, but removed on the assumption that they have been moved to google.cloud. Since this turned out to be incorrect, we re-added them for 1.0.0.
|
||||
- Add the deprecated ``gcp_backend_service``, ``gcp_forwarding_rule`` and ``gcp_healthcheck`` modules, which will be removed in 2.0.0. These were originally in community.general, but removed on the assumption that they have been moved to google.cloud. Since this turned out to be incorrect, we re-added them for 1.0.0.
|
||||
- The collection is now actively tested in CI with the latest Ansible 2.9 release.
|
||||
- airbrake_deployment - add ``version`` param; clarified docs on ``revision`` param (https://github.com/ansible-collections/community.general/pull/583).
|
||||
- apk - added ``no_cache`` option (https://github.com/ansible-collections/community.general/pull/548).
|
||||
- firewalld - the module has been moved to the ``ansible.posix`` collection. A redirection is active, which will be removed in version 2.0.0 (https://github.com/ansible-collections/community.general/pull/623).
|
||||
- gitlab_project - add support for merge_method on projects (https://github.com/ansible/ansible/pull/66813).
|
||||
- gitlab_runners inventory plugin - permit environment variable input for ``server_url``, ``api_token`` and ``filter`` options (https://github.com/ansible-collections/community.general/pull/611).
|
||||
- haproxy - add options to dis/enable health and agent checks. When health and agent checks are enabled for a service, a disabled service will re-enable itself automatically. These options also change the state of the agent checks to match the requested state for the backend (https://github.com/ansible-collections/community.general/issues/684).
|
||||
- log_plays callback - use v2 methods (https://github.com/ansible-collections/community.general/pull/442).
|
||||
- logstash callback - add ini config (https://github.com/ansible-collections/community.general/pull/610).
|
||||
- lxd_container - added support of ``--target`` flag for cluster deployments (https://github.com/ansible-collections/community.general/issues/637).
|
||||
- parted - accept negative numbers in ``part_start`` and ``part_end``
|
||||
- pkgng - added ``stdout`` and ``stderr`` attributes to the result (https://github.com/ansible-collections/community.general/pull/560).
|
||||
- pkgng - added support for upgrading all packages using ``name: *, state: latest``, similar to other package providers (https://github.com/ansible-collections/community.general/pull/569).
|
||||
- postgresql_query - add search_path parameter (https://github.com/ansible-collections/community.general/issues/625).
|
||||
- rundeck_acl_policy - add check for rundeck_acl_policy name parameter (https://github.com/ansible-collections/community.general/pull/612).
|
||||
- slack - add support for sending messages built with block kit (https://github.com/ansible-collections/community.general/issues/380).
|
||||
- splunk callback - add an option to allow not to validate certificate from HEC (https://github.com/ansible-collections/community.general/pull/596).
|
||||
- xfconf - add arrays support (https://github.com/ansible/ansible/issues/46308).
|
||||
- xfconf - add support for ``uint`` type (https://github.com/ansible-collections/community.general/pull/696).
|
||||
|
||||
Breaking Changes / Porting Guide
|
||||
--------------------------------
|
||||
|
||||
- log_plays callback - add missing information to the logs generated by the callback plugin. This changes the log message format (https://github.com/ansible-collections/community.general/pull/442).
|
||||
- pkgng - passing ``name: *`` with ``state: absent`` will no longer remove every installed package from the system. It is now a noop. (https://github.com/ansible-collections/community.general/pull/569).
|
||||
- pkgng - passing ``name: *`` with ``state: latest`` or ``state: present`` will no longer install every package from the configured package repositories. Instead, ``name: *, state: latest`` will upgrade all already-installed packages, and ``name: *, state: present`` is a noop. (https://github.com/ansible-collections/community.general/pull/569).
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- The ldap_attr module has been deprecated and will be removed in a later release; use ldap_attrs instead.
|
||||
- xbps - the ``force`` option never had any effect. It is now deprecated, and will be removed in 3.0.0 (https://github.com/ansible-collections/community.general/pull/568).
|
||||
|
||||
Removed Features (previously deprecated)
|
||||
----------------------------------------
|
||||
|
||||
- conjur_variable lookup - has been moved to the ``cyberark.conjur`` collection. A redirection is active, which will be removed in version 2.0.0 (https://github.com/ansible-collections/community.general/pull/570).
|
||||
- digital_ocean_* - all DigitalOcean modules have been moved to the ``community.digitalocean`` collection. A redirection is active, which will be removed in version 2.0.0 (https://github.com/ansible-collections/community.general/pull/622).
|
||||
- infini_* - all infinidat modules have been moved to the ``infinidat.infinibox`` collection. A redirection is active, which will be removed in version 2.0.0 (https://github.com/ansible-collections/community.general/pull/607).
|
||||
- logicmonitor - the module has been removed in 1.0.0 since it is unmaintained and the API used by the module has been turned off in 2017 (https://github.com/ansible-collections/community.general/issues/539, https://github.com/ansible-collections/community.general/pull/541).
|
||||
- logicmonitor_facts - the module has been removed in 1.0.0 since it is unmaintained and the API used by the module has been turned off in 2017 (https://github.com/ansible-collections/community.general/issues/539, https://github.com/ansible-collections/community.general/pull/541).
|
||||
- mysql_* - all MySQL modules have been moved to the ``community.mysql`` collection. A redirection is active, which will be removed in version 2.0.0 (https://github.com/ansible-collections/community.general/pull/633).
|
||||
- proxysql_* - all ProxySQL modules have been moved to the ``community.proxysql`` collection. A redirection is active, which will be removed in version 2.0.0 (https://github.com/ansible-collections/community.general/pull/624).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- aix_filesystem - fix issues with ismount module_util pathing for Ansible 2.9 (https://github.com/ansible-collections/community.general/pull/567).
|
||||
- consul_kv lookup - fix ``ANSIBLE_CONSUL_URL`` environment variable handling (https://github.com/ansible/ansible/issues/51960).
|
||||
- consul_kv lookup - fix arguments handling (https://github.com/ansible-collections/community.general/pull/303).
|
||||
- digital_ocean_tag_info - fix crash when querying for an individual tag (https://github.com/ansible-collections/community.general/pull/615).
|
||||
- doas become plugin - address a bug with the parameters handling that was breaking the plugin in community.general when ``become_flags`` and ``become_user`` were not explicitly specified (https://github.com/ansible-collections/community.general/pull/704).
|
||||
- docker_compose - add a condition to prevent service startup if parameter ``stopped`` is true. Otherwise, the service will be started on each play and stopped again immediately due to the ``stopped`` parameter and breaks the idempotency of the module (https://github.com/ansible-collections/community.general/issues/532).
|
||||
- docker_compose - disallow usage of the parameters ``stopped`` and ``restarted`` at the same time. This breaks also the idempotency (https://github.com/ansible-collections/community.general/issues/532).
|
||||
- docker_container - use Config MacAddress by default instead of Networks. Networks MacAddress is empty in some cases (https://github.com/ansible/ansible/issues/70206).
|
||||
- docker_container - various error fixes in string handling for Python 2 to avoid crashes when non-ASCII characters are used in strings (https://github.com/ansible-collections/community.general/issues/640).
|
||||
- docker_swarm - removes ``advertise_addr`` from list of required arguments when ``state`` is ``"join"`` (https://github.com/ansible-collections/community.general/issues/439).
|
||||
- dzdo become plugin - address a bug with the parameters handling that was breaking the plugin in community.general when ``become_user`` was not explicitly specified (https://github.com/ansible-collections/community.general/pull/708).
|
||||
- filesystem - resizefs of xfs filesystems is fixed. Filesystem needs to be mounted.
|
||||
- jenkins_plugin - replace MD5 checksum verification with SHA1 due to MD5 being disabled on systems with FIPS-only algorithms enabled (https://github.com/ansible/ansible/issues/34304).
|
||||
- jira - improve error message handling (https://github.com/ansible-collections/community.general/pull/311).
|
||||
- jira - improve error message handling with multiple errors (https://github.com/ansible-collections/community.general/pull/707).
|
||||
- kubevirt - Add aliases 'interface_name' for network_name (https://github.com/ansible/ansible/issues/55641).
|
||||
- nmcli - fix idempotetency when modifying an existing connection (https://github.com/ansible-collections/community.general/issues/481).
|
||||
- osx_defaults - fix handling negative integers (https://github.com/ansible-collections/community.general/issues/134).
|
||||
- pacman - treat package names containing .zst as package files during installation (https://www.archlinux.org/news/now-using-zstandard-instead-of-xz-for-package-compression/, https://github.com/ansible-collections/community.general/pull/650).
|
||||
- pbrun become plugin - address a bug with the parameters handling that was breaking the plugin in community.general when ``become_user`` was not explicitly specified (https://github.com/ansible-collections/community.general/pull/708).
|
||||
- postgresql_privs - fix crash when set privileges on schema with hyphen in the name (https://github.com/ansible-collections/community.general/issues/656).
|
||||
- postgresql_set - only display a warning about restarts, when restarting is needed (https://github.com/ansible-collections/community.general/pull/651).
|
||||
- redfish_info, redfish_config, redfish_command - Fix Redfish response payload decode on Python 3.5 (https://github.com/ansible-collections/community.general/issues/686)
|
||||
- selective - mark task failed correctly (https://github.com/ansible/ansible/issues/63767).
|
||||
- snmp_facts - skip ``EndOfMibView`` values (https://github.com/ansible/ansible/issues/49044).
|
||||
- yarn - fixed an index out of range error when no outdated packages where returned by yarn executable (see https://github.com/ansible-collections/community.general/pull/474).
|
||||
- yarn - fixed an too many values to unpack error when scoped packages are installed (see https://github.com/ansible-collections/community.general/pull/474).
|
||||
|
||||
New Plugins
|
||||
-----------
|
||||
|
||||
Inventory
|
||||
~~~~~~~~~
|
||||
|
||||
- cobbler - Cobbler inventory source
|
||||
|
||||
Lookup
|
||||
~~~~~~
|
||||
|
||||
- dsv - Get secrets from Thycotic DevOps Secrets Vault
|
||||
- tss - Get secrets from Thycotic Secret Server
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
Cloud
|
||||
~~~~~
|
||||
|
||||
docker
|
||||
^^^^^^
|
||||
|
||||
- docker_stack_info - Return information on a docker stack
|
||||
|
||||
Database
|
||||
~~~~~~~~
|
||||
|
||||
misc
|
||||
^^^^
|
||||
|
||||
- odbc - Execute SQL via ODBC
|
||||
|
||||
System
|
||||
~~~~~~
|
||||
|
||||
- launchd - Manage macOS services
|
||||
|
||||
v0.2.0
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
This is the first proper release of the ``community.general`` collection on 2020-06-20.
|
||||
The changelog describes all changes made to the modules and plugins included in this
|
||||
collection since Ansible 2.9.0.
|
||||
|
||||
|
||||
Major Changes
|
||||
-------------
|
||||
|
||||
- docker_container - the ``network_mode`` option will be set by default to the name of the first network in ``networks`` if at least one network is given and ``networks_cli_compatible`` is ``true`` (will be default from community.general 2.0.0 on). Set to an explicit value to avoid deprecation warnings if you specify networks and set ``networks_cli_compatible`` to ``true``. The current default (not specifying it) is equivalent to the value ``default``.
|
||||
- docker_container - the module has a new option, ``container_default_behavior``, whose default value will change from ``compatibility`` to ``no_defaults``. Set to an explicit value to avoid deprecation warnings.
|
||||
- gitlab_user - no longer requires ``name``, ``email`` and ``password`` arguments when ``state=absent``.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- A new filter ``to_time_unit`` with specializations ``to_milliseconds``, ``to_seconds``, ``to_minutes``, ``to_hours``, ``to_days``, ``to_weeks``, ``to_months`` and ``to_years`` has been added. For example ``'2d 4h' | community.general.to_hours`` evaluates to 52.
|
||||
- Add a make option to the make module to be able to choose a specific make executable
|
||||
- Add information about changed packages in homebrew returned facts (https://github.com/ansible/ansible/issues/59376).
|
||||
- Follow up changes in homebrew_cask (https://github.com/ansible/ansible/issues/34696).
|
||||
- Moved OpenStack dynamic inventory script to Openstack Collection.
|
||||
- Remove redundant encoding in json.load call in ipa module_utils (https://github.com/ansible/ansible/issues/66592).
|
||||
- Updated documentation about netstat command requirement for listen_ports_facts module (https://github.com/ansible/ansible/issues/68077).
|
||||
- airbrake_deployment - Allow passing ``project_id`` and ``project_key`` for v4 api deploy compatibility
|
||||
- ali_instance - Add params ``unique_suffix``, ``tags``, ``purge_tags``, ``ram_role_name``, ``spot_price_limit``, ``spot_strategy``, ``period_unit``, ``dry_run``, ``include_data_disks``
|
||||
- ali_instance and ali_instance_info - the required package footmark needs a version higher than 1.19.0
|
||||
- ali_instance_info - Add params ``name_prefix``, ``filters``
|
||||
- alicloud modules - Add authentication params to all modules
|
||||
- alicloud modules - now only support Python 3.6, not support Python 2.x
|
||||
- cisco_spark - the module has been renamed to ``cisco_webex`` (https://github.com/ansible-collections/community.general/pull/457).
|
||||
- cloudflare_dns - Report unexpected failure with more detail (https://github.com/ansible-collections/community.general/pull/511).
|
||||
- database - add support to unique indexes in postgresql_idx
|
||||
- digital_ocean_droplet - add support for new vpc_uuid parameter
|
||||
- docker connection plugin - run Powershell modules on Windows containers.
|
||||
- docker_container - add ``cpus`` option (https://github.com/ansible/ansible/issues/34320).
|
||||
- docker_container - add new ``container_default_behavior`` option (PR https://github.com/ansible/ansible/pull/63419).
|
||||
- docker_container - allow to configure timeout when the module waits for a container's removal.
|
||||
- docker_container - only passes anonymous volumes to docker daemon as ``Volumes``. This increases compatibility with the ``docker`` CLI program. Note that if you specify ``volumes: strict`` in ``comparisons``, this could cause existing containers created with docker_container from Ansible 2.9 or earlier to restart.
|
||||
- docker_container - support for port ranges was adjusted to be more compatible to the ``docker`` command line utility: a one-port container range combined with a multiple-port host range will no longer result in only the first host port be used, but the whole range being passed to Docker so that a free port in that range will be used.
|
||||
- docker_container.py - update a containers restart_policy without restarting the container (https://github.com/ansible/ansible/issues/65993)
|
||||
- docker_stack - Added ``stdout``, ``stderr``, and ``rc`` to return values.
|
||||
- docker_swarm_service - Added support for ``init`` option.
|
||||
- docker_swarm_service - Sort lists when checking for changes.
|
||||
- firewalld - new feature, can now set ``target`` for a ``zone`` (https://github.com/ansible-collections/community.general/pull/526).
|
||||
- flatpak and flatpak_remote - use ``module.run_command()`` instead of ``subprocess.Popen()``.
|
||||
- gitlab_project_variable - implement masked and protected attributes
|
||||
- gitlab_project_variable - implemented variable_type attribute.
|
||||
- hashi_vault - AWS IAM auth method added. Accepts standard ansible AWS params and only loads AWS libraries when needed.
|
||||
- hashi_vault - INI and additional ENV sources made available for some new and old options.
|
||||
- hashi_vault - ``secret`` can now be an unnamed argument if it's specified first in the term string (see examples).
|
||||
- hashi_vault - ``token`` is now an explicit option (and the default) in the choices for ``auth_method``. This matches previous behavior (``auth_method`` omitted resulted in token auth) but makes the value clearer and allows it to be explicitly specified.
|
||||
- hashi_vault - new option ``return_format`` added to control how secrets are returned, including options for multiple secrets and returning raw values with metadata.
|
||||
- hashi_vault - previous (undocumented) behavior was to attempt to read token from ``~/.vault-token`` if not specified. This is now controlled through ``token_path`` and ``token_file`` options (defaults will mimic previous behavior).
|
||||
- hashi_vault - previously all options had to be supplied via key=value pairs in the term string; now a mix of string and parameters can be specified (see examples).
|
||||
- hashi_vault - uses newer authentication calls in the HVAC library and falls back to older ones with deprecation warnings.
|
||||
- homebrew - Added environment variable to honor update_homebrew setting (https://github.com/ansible/ansible/issues/56650).
|
||||
- homebrew - New option ``upgrade_options`` allows to pass flags to upgrade
|
||||
- homebrew - ``install_options`` is now validated to be a list of strings.
|
||||
- homebrew_tap - ``name`` is now validated to be a list of strings.
|
||||
- idrac_redfish_config - Support for multiple manager attributes configuration
|
||||
- java_keystore - add the private_key_passphrase parameter (https://github.com/ansible-collections/community.general/pull/276).
|
||||
- jira - added search function with support for Jira JQL (https://github.com/ansible-collections/community.general/pull/22).
|
||||
- jira - added update function which can update Jira Selects etc (https://github.com/ansible-collections/community.general/pull/22).
|
||||
- lvg - add ``pvresize`` new parameter (https://github.com/ansible/ansible/issues/29139).
|
||||
- mysql_db - add ``master_data`` parameter (https://github.com/ansible/ansible/pull/66048).
|
||||
- mysql_db - add ``skip_lock_tables`` option (https://github.com/ansible/ansible/pull/66688).
|
||||
- mysql_db - add the ``check_implicit_admin`` parameter (https://github.com/ansible/ansible/issues/24418).
|
||||
- mysql_db - add the ``config_overrides_defaults`` parameter (https://github.com/ansible/ansible/issues/26919).
|
||||
- mysql_db - add the ``dump_extra_args`` parameter (https://github.com/ansible/ansible/pull/67747).
|
||||
- mysql_db - add the ``executed_commands`` returned value (https://github.com/ansible/ansible/pull/65498).
|
||||
- mysql_db - add the ``force`` parameter (https://github.com/ansible/ansible/pull/65547).
|
||||
- mysql_db - add the ``restrict_config_file`` parameter (https://github.com/ansible/ansible/issues/34488).
|
||||
- mysql_db - add the ``unsafe_login_password`` parameter (https://github.com/ansible/ansible/issues/63955).
|
||||
- mysql_db - add the ``use_shell`` parameter (https://github.com/ansible/ansible/issues/20196).
|
||||
- mysql_info - add ``exclude_fields`` parameter (https://github.com/ansible/ansible/issues/63319).
|
||||
- mysql_info - add ``global_status`` filter parameter option and return (https://github.com/ansible/ansible/pull/63189).
|
||||
- mysql_info - add ``return_empty_dbs`` parameter to list empty databases (https://github.com/ansible/ansible/issues/65727).
|
||||
- mysql_replication - add ``channel`` parameter (https://github.com/ansible/ansible/issues/29311).
|
||||
- mysql_replication - add ``connection_name`` parameter (https://github.com/ansible/ansible/issues/46243).
|
||||
- mysql_replication - add ``fail_on_error`` parameter (https://github.com/ansible/ansible/pull/66252).
|
||||
- mysql_replication - add ``master_delay`` parameter (https://github.com/ansible/ansible/issues/51326).
|
||||
- mysql_replication - add ``master_use_gtid`` parameter (https://github.com/ansible/ansible/pull/62648).
|
||||
- mysql_replication - add ``queries`` return value (https://github.com/ansible/ansible/pull/63036).
|
||||
- mysql_replication - add support of ``resetmaster`` choice to ``mode`` parameter (https://github.com/ansible/ansible/issues/42870).
|
||||
- mysql_user - ``priv`` parameter can be string or dictionary (https://github.com/ansible/ansible/issues/57533).
|
||||
- mysql_user - add ``plugin_auth_string`` parameter (https://github.com/ansible/ansible/pull/44267).
|
||||
- mysql_user - add ``plugin_hash_string`` parameter (https://github.com/ansible/ansible/pull/44267).
|
||||
- mysql_user - add ``plugin`` parameter (https://github.com/ansible/ansible/pull/44267).
|
||||
- mysql_user - add the resource_limits parameter (https://github.com/ansible-collections/community.general/issues/133).
|
||||
- mysql_variables - add ``mode`` parameter (https://github.com/ansible/ansible/issues/60119).
|
||||
- nagios module - a start parameter has been added, allowing the time a Nagios outage starts to be set. It defaults to the current time if not provided, preserving the previous behavior and ensuring compatibility with existing playbooks.
|
||||
- nsupdate - Use provided TSIG key to not only sign update queries but also lookup queries
|
||||
- open_iscsi - allow ``portal`` parameter to be a domain name by resolving the portal ip address beforehand (https://github.com/ansible-collections/community.general/pull/461).
|
||||
- packet_device - add ``tags`` parameter on device creation (https://github.com/ansible-collections/community.general/pull/418)
|
||||
- pacman - Improve package state detection speed: Don't query for full details of a package.
|
||||
- parted - add the ``fs_type`` parameter (https://github.com/ansible-collections/community.general/issues/135).
|
||||
- pear - added ``prompts`` parameter to allow users to specify expected prompt that could hang Ansible execution (https://github.com/ansible-collections/community.general/pull/530).
|
||||
- postgresql_copy - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/313).
|
||||
- postgresql_db - add ``dump_extra_args`` parameter (https://github.com/ansible/ansible/pull/66717).
|
||||
- postgresql_db - add support for .pgc file format for dump and restores.
|
||||
- postgresql_db - add the ``executed_commands`` returned value (https://github.com/ansible/ansible/pull/65542).
|
||||
- postgresql_db - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/issues/106).
|
||||
- postgresql_ext - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/282).
|
||||
- postgresql_ext - refactor to simplify and remove dead code (https://github.com/ansible-collections/community.general/pull/291)
|
||||
- postgresql_ext - use query parameters with cursor object (https://github.com/ansible/ansible/pull/64994).
|
||||
- postgresql_idx - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/264).
|
||||
- postgresql_idx - refactor to simplify code (https://github.com/ansible-collections/community.general/pull/291)
|
||||
- postgresql_info - add collecting info about logical replication publications in databases (https://github.com/ansible/ansible/pull/67614).
|
||||
- postgresql_info - add collection info about replication subscriptions (https://github.com/ansible/ansible/pull/67464).
|
||||
- postgresql_info - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/308).
|
||||
- postgresql_lang - add ``owner`` parameter (https://github.com/ansible/ansible/pull/62999).
|
||||
- postgresql_lang - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/272).
|
||||
- postgresql_membership - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/158).
|
||||
- postgresql_owner - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/198).
|
||||
- postgresql_ping - add the ``session_role`` parameter (https://github.com/ansible-collections/community.general/pull/312).
|
||||
- postgresql_ping - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/312).
|
||||
- postgresql_privs - add support for TYPE as object types in postgresql_privs module (https://github.com/ansible/ansible/issues/62432).
|
||||
- postgresql_privs - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/177).
|
||||
- postgresql_publication - add the ``session_role`` parameter (https://github.com/ansible-collections/community.general/pull/279).
|
||||
- postgresql_publication - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/279).
|
||||
- postgresql_query - add the ``encoding`` parameter (https://github.com/ansible/ansible/issues/65367).
|
||||
- postgresql_query - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/294).
|
||||
- postgresql_schema - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/259).
|
||||
- postgresql_sequence - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/295).
|
||||
- postgresql_set - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/302).
|
||||
- postgresql_slot - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/298).
|
||||
- postgresql_subscription - add the ``session_role`` parameter (https://github.com/ansible-collections/community.general/pull/280).
|
||||
- postgresql_subscription - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/280).
|
||||
- postgresql_table - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/307).
|
||||
- postgresql_tablespace - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/240).
|
||||
- postgresql_user - add scram-sha-256 support (https://github.com/ansible/ansible/issues/49878).
|
||||
- postgresql_user - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/116).
|
||||
- postgresql_user - add the comment parameter (https://github.com/ansible/ansible/pull/66711).
|
||||
- postgresql_user_obj_stat_info - add the ``trust_input`` parameter (https://github.com/ansible-collections/community.general/pull/310).
|
||||
- postgresql_user_obj_stat_info - refactor to simplify code (https://github.com/ansible-collections/community.general/pull/291)
|
||||
- proxmox - add the ``description`` and ``hookscript`` parameter (https://github.com/ansible-collections/community.general/pull/245).
|
||||
- redfish_command - Support for virtual media insert and eject commands (https://github.com/ansible-collections/community.general/issues/493)
|
||||
- redfish_config - New ``bios_attributes`` option to allow setting multiple BIOS attributes in one command.
|
||||
- redfish_config, redfish_command - Add ``resource_id`` option to specify which System, Manager, or Chassis resource to modify.
|
||||
- redis - add TLS support to redis cache plugin (https://github.com/ansible-collections/community.general/pull/410).
|
||||
- rhn_channel - Added ``validate_certs`` option (https://github.com/ansible/ansible/issues/68374).
|
||||
- rundeck modules - added new options ``client_cert``, ``client_key``, ``force``, ``force_basic_auth``, ``http_agent``, ``url_password``, ``url_username``, ``use_proxy``, ``validate_certs`` to allow changing fetch_url parameters.
|
||||
- slack - Add support for user/bot/application tokens (using Slack WebAPI)
|
||||
- slack - Return ``thread_id`` with thread timestamp when user/bot/application tokens are used
|
||||
- syslogger - added new parameter ident to specify the name of application which is sending the message to syslog (https://github.com/ansible-collections/community.general/issues/319).
|
||||
- terraform - Adds option ``backend_config_files``. This can accept a list of paths to multiple configuration files (https://github.com/ansible-collections/community.general/pull/394).
|
||||
- terraform - Adds option ``variables_files`` for multiple var-files (https://github.com/ansible-collections/community.general/issues/224).
|
||||
- ufw - accept ``interface_in`` and ``interface_out`` as parameters.
|
||||
- zypper - Added ``allow_vendor_change`` and ``replacefiles`` zypper options (https://github.com/ansible-collections/community.general/issues/381)
|
||||
|
||||
Breaking Changes / Porting Guide
|
||||
--------------------------------
|
||||
|
||||
- The environment variable for the auth context for the oc.py connection plugin has been corrected (K8S_CONTEXT). It was using an initial lowercase k by mistake. (https://github.com/ansible-collections/community.general/pull/377).
|
||||
- bigpanda - the parameter ``message`` was renamed to ``deployment_message`` since ``message`` is used by Ansible Core engine internally.
|
||||
- cisco_spark - the module option ``message`` was renamed to ``msg``, as ``message`` is used internally in Ansible Core engine (https://github.com/ansible/ansible/issues/39295)
|
||||
- datadog - the parameter ``message`` was renamed to ``notification_message`` since ``message`` is used by Ansible Core engine internally.
|
||||
- docker_container - no longer passes information on non-anonymous volumes or binds as ``Volumes`` to the Docker daemon. This increases compatibility with the ``docker`` CLI program. Note that if you specify ``volumes: strict`` in ``comparisons``, this could cause existing containers created with docker_container from Ansible 2.9 or earlier to restart.
|
||||
- docker_container - support for port ranges was adjusted to be more compatible to the ``docker`` command line utility: a one-port container range combined with a multiple-port host range will no longer result in only the first host port be used, but the whole range being passed to Docker so that a free port in that range will be used.
|
||||
- hashi_vault lookup - now returns the latest version when using the KV v2 secrets engine. Previously, it returned all versions of the secret which required additional steps to extract and filter the desired version.
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- airbrake_deployment - Add deprecation notice for ``token`` parameter and v2 api deploys. This feature will be removed in community.general 3.0.0.
|
||||
- clc_aa_policy - The ``wait`` option had no effect and will be removed in community.general 3.0.0.
|
||||
- clc_aa_policy - the ``wait`` parameter will be removed. It has always been ignored by the module.
|
||||
- docker_container - the ``trust_image_content`` option is now deprecated and will be removed in community.general 3.0.0. It has never been used by the module.
|
||||
- docker_container - the ``trust_image_content`` option will be removed. It has always been ignored by the module.
|
||||
- docker_container - the default of ``container_default_behavior`` will change from ``compatibility`` to ``no_defaults`` in community.general 3.0.0. Set the option to an explicit value to avoid a deprecation warning.
|
||||
- docker_container - the default value for ``network_mode`` will change in community.general 3.0.0, provided at least one network is specified and ``networks_cli_compatible`` is ``true``. See porting guide, module documentation or deprecation warning for more details.
|
||||
- docker_stack - Return values ``out`` and ``err`` have been deprecated and will be removed in community.general 3.0.0. Use ``stdout`` and ``stderr`` instead.
|
||||
- docker_stack - the return values ``err`` and ``out`` have been deprecated. Use ``stdout`` and ``stderr`` from now on instead.
|
||||
- helm - Put ``helm`` module to deprecated. New implementation is available in community.kubernetes collection.
|
||||
- redfish_config - Deprecate ``bios_attribute_name`` and ``bios_attribute_value`` in favor of new `bios_attributes`` option.
|
||||
- redfish_config - the ``bios_attribute_name`` and ``bios_attribute_value`` options will be removed. To maintain the existing behavior use the ``bios_attributes`` option instead.
|
||||
- redfish_config and redfish_command - the behavior to select the first System, Manager, or Chassis resource to modify when multiple are present will be removed. Use the new ``resource_id`` option to specify target resource to modify.
|
||||
- redfish_config, redfish_command - Behavior to modify the first System, Mananger, or Chassis resource when multiple are present is deprecated. Use the new ``resource_id`` option to specify target resource to modify.
|
||||
|
||||
Removed Features (previously deprecated)
|
||||
----------------------------------------
|
||||
|
||||
- core - remove support for ``check_invalid_arguments`` in ``UTMModule``.
|
||||
- pacman - Removed deprecated ``recurse`` option, use ``extra_args=--recursive`` instead
|
||||
|
||||
Security Fixes
|
||||
--------------
|
||||
|
||||
- **SECURITY** - CVE-2019-14904 - solaris_zone module accepts zone name and performs actions related to that. However, there is no user input validation done while performing actions. A malicious user could provide a crafted zone name which allows executing commands into the server manipulating the module behaviour. Adding user input validation as per Solaris Zone documentation fixes this issue.
|
||||
- **security issue** - Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs (CVE-2019-14864)
|
||||
- ldap_attr, ldap_entry - The ``params`` option has been removed in Ansible-2.10 as it circumvents Ansible's option handling. Setting ``bind_pw`` with the ``params`` option was disallowed in Ansible-2.7, 2.8, and 2.9 as it was insecure. For information about this policy, see the discussion at: https://meetbot.fedoraproject.org/ansible-meeting/2017-09-28/ansible_dev_meeting.2017-09-28-15.00.log.html This fixes CVE-2020-1746
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Convert MD5SUM to lowercase before comparison in maven_artifact module (https://github.com/ansible-collections/community.general/issues/186).
|
||||
- Fix GitLab modules authentication by handling `python-gitlab` library version >= 1.13.0 (https://github.com/ansible/ansible/issues/64770)
|
||||
- Fix SSL protocol references in the ``mqtt`` module to prevent failures on Python 2.6.
|
||||
- Fix the ``xml`` module to use ``list(elem)`` instead of ``elem.getchildren()`` since it is being removed in Python 3.9
|
||||
- Fix to return XML as a string even for python3 (https://github.com/ansible/ansible/pull/64032).
|
||||
- Fixes the url handling in lxd_container module that url cannot be specified in lxd environment created by snap.
|
||||
- Fixes the url handling in lxd_profile module that url cannot be specified in lxd environment created by snap.
|
||||
- Redact GitLab Project variables which might include sensetive information such as password, api_keys and other project related details.
|
||||
- Run command in absent state in atomic_image module.
|
||||
- While deleting gitlab user, name, email and password is no longer required ini gitlab_user module (https://github.com/ansible/ansible/issues/61921).
|
||||
- airbrake_deployment - Allow deploy notifications for Airbrake compatible v2 api (e.g. Errbit)
|
||||
- apt_rpm - fix ``package`` type from ``str`` to ``list`` to fix invoking with list of packages (https://github.com/ansible-collections/community.general/issues/143).
|
||||
- archive - make module compatible with older Ansible versions (https://github.com/ansible-collections/community.general/pull/306).
|
||||
- become - Fix various plugins that still used play_context to get the become password instead of through the plugin - https://github.com/ansible/ansible/issues/62367
|
||||
- cloudflare_dns - fix KeyError 'success' (https://github.com/ansible-collections/community.general/issues/236).
|
||||
- cronvar - only run ``get_bin_path()`` once
|
||||
- cronvar - use correct binary name (https://github.com/ansible/ansible/issues/63274)
|
||||
- cronvar - use get_bin_path utility to locate the default crontab executable instead of the hardcoded /usr/bin/crontab. (https://github.com/ansible/ansible/pull/59765)
|
||||
- cyberarkpassword - fix invalid attribute access (https://github.com/ansible/ansible/issues/66268)
|
||||
- datadog_monitor - Corrects ``_update_monitor`` to use ``notification_message`` insteade of deprecated ``message`` (https://github.com/ansible-collections/community.general/pull/389).
|
||||
- datadog_monitor - added missing ``log alert`` type to ``type`` choices (https://github.com/ansible-collections/community.general/issues/251).
|
||||
- dense callback - fix plugin access to its configuration variables and remove a warning message (https://github.com/ansible/ansible/issues/64628).
|
||||
- digital_ocean_droplet - Fix creation of DigitalOcean droplets using digital_ocean_droplet module (https://github.com/ansible/ansible/pull/61655)
|
||||
- docker connection plugin - do not prefix remote path if running on Windows containers.
|
||||
- docker_compose - fix issue where docker deprecation warning results in ansible erroneously reporting a failure
|
||||
- docker_container - fix idempotency for IP addresses for networks. The old implementation checked the effective IP addresses assigned by the Docker daemon, and not the specified ones. This causes idempotency issues for containers which are not running, since they have no effective IP addresses assigned.
|
||||
- docker_container - fix network idempotence comparison error.
|
||||
- docker_container - improve error behavior when parsing port ranges fails.
|
||||
- docker_container - make sure that when image is missing, check mode indicates a change (image will be pulled).
|
||||
- docker_container - passing ``test: [NONE]`` now actually disables the image's healthcheck, as documented.
|
||||
- docker_container - wait for removal of container if docker API returns early (https://github.com/ansible/ansible/issues/65811).
|
||||
- docker_image - fix validation of build options.
|
||||
- docker_image - improve file handling when loading images from disk.
|
||||
- docker_image - make sure that deprecated options also emit proper deprecation warnings next to warnings which indicate how to replace them.
|
||||
- docker_login - Use ``with`` statement when accessing files, to prevent that invalid JSON output is produced.
|
||||
- docker_login - correct broken fix for https://github.com/ansible/ansible/pull/60381 which crashes for Python 3.
|
||||
- docker_login - fix error handling when ``username`` or ``password`` is not specified when ``state`` is ``present``.
|
||||
- docker_login - make sure that ``~/.docker/config.json`` is created with permissions ``0600``.
|
||||
- docker_machine - fallback to ip subcommand output if IPAddress is missing (https://github.com/ansible-collections/community.general/issues/412).
|
||||
- docker_network - fix idempotence comparison error.
|
||||
- docker_network - fix idempotency for multiple IPAM configs of the same IP version (https://github.com/ansible/ansible/issues/65815).
|
||||
- docker_network - validate IPAM config subnet CIDR notation on module setup and not during idempotence checking.
|
||||
- docker_node_info - improve error handling when service inspection fails, for example because node name being ambiguous (https://github.com/ansible/ansible/issues/63353, PR https://github.com/ansible/ansible/pull/63418).
|
||||
- docker_swarm_service - ``source`` must no longer be specified for ``tmpfs`` mounts.
|
||||
- docker_swarm_service - fix task always reporting as changed when using ``healthcheck.start_period``.
|
||||
- docker_swarm_service - passing ``test: [NONE]`` now actually disables the image's healthcheck, as documented.
|
||||
- firewalld - enable the firewalld module to function offline with firewalld version 0.7.0 and newer (https://github.com/ansible/ansible/issues/63254)
|
||||
- flatpak and flatpak_remote - fix command line construction to build commands as lists instead of strings.
|
||||
- gcp_storage_file lookup - die gracefully when the ``google.cloud`` collection is not installed, or changed in an incompatible way.
|
||||
- github_deploy_key - added support for pagination
|
||||
- gitlab_user - Fix adding ssh key to new/changed user and adding group membership for new/changed user
|
||||
- hashi_vault - Fix KV v2 lookup to always return latest version
|
||||
- hashi_vault - Handle equal sign in key=value (https://github.com/ansible/ansible/issues/55658).
|
||||
- hashi_vault - error messages are now user friendly and don't contain the secret name ( https://github.com/ansible-collections/community.general/issues/54 )
|
||||
- hashi_vault - if used via ``with_hashi_vault`` and a list of n secrets to retrieve, only the first one would be retrieved and returned n times.
|
||||
- hashi_vault - when a non-token authentication method like ldap or userpass failed, but a valid token was loaded anyway (via env or token file), the token was used to attempt authentication, hiding the failure of the requested auth method.
|
||||
- homebrew - fix Homebrew module's some functions ignored check_mode option (https://github.com/ansible/ansible/pull/65387).
|
||||
- influxdb_user - Don't grant admin privilege in check mode
|
||||
- ipa modules - fix error when IPA_HOST is empty and fallback on DNS (https://github.com/ansible-collections/community.general/pull/241)
|
||||
- java_keystore - make module compatible with older Ansible versions (https://github.com/ansible-collections/community.general/pull/306).
|
||||
- jira - printing full error message from jira server (https://github.com/ansible-collections/community.general/pull/22).
|
||||
- jira - transition issue not working (https://github.com/ansible-collections/community.general/issues/109).
|
||||
- linode inventory plugin - fix parsing of access_token (https://github.com/ansible/ansible/issues/66874)
|
||||
- manageiq_provider - fix serialization error when running on python3 environment.
|
||||
- maven_artifact - make module compatible with older Ansible versions (https://github.com/ansible-collections/community.general/pull/306).
|
||||
- mysql - dont mask ``mysql_connect`` function errors from modules (https://github.com/ansible/ansible/issues/64560).
|
||||
- mysql_db - fix Broken pipe error appearance when state is import and the target file is compressed (https://github.com/ansible/ansible/issues/20196).
|
||||
- mysql_db - fix bug in the ``db_import`` function introduced by https://github.com/ansible/ansible/pull/56721 (https://github.com/ansible/ansible/issues/65351).
|
||||
- mysql_info - add parameter for __collect to get only what are wanted (https://github.com/ansible-collections/community.general/pull/136).
|
||||
- mysql_replication - allow to pass empty values to parameters (https://github.com/ansible/ansible/issues/23976).
|
||||
- mysql_user - Fix idempotence when long grant lists are used (https://github.com/ansible/ansible/issues/68044)
|
||||
- mysql_user - Remove false positive ``no_log`` warning for ``update_password`` option
|
||||
- mysql_user - add ``INVOKE LAMBDA`` privilege support (https://github.com/ansible-collections/community.general/issues/283).
|
||||
- mysql_user - fix ``host_all`` arguments conversion string formatting error (https://github.com/ansible/ansible/issues/29644).
|
||||
- mysql_user - fix support privileges with underscore (https://github.com/ansible/ansible/issues/66974).
|
||||
- mysql_user - fix the error No database selected (https://github.com/ansible/ansible/issues/68070).
|
||||
- mysql_user - make sure current_pass_hash is a string before using it in comparison (https://github.com/ansible/ansible/issues/60567).
|
||||
- mysql_variable - fix the module doesn't support variables name with dot (https://github.com/ansible/ansible/issues/54239).
|
||||
- nmcli - typecast parameters to string as required (https://github.com/ansible/ansible/issues/59095).
|
||||
- nsupdate - Do not try fixing non-existing TXT values (https://github.com/ansible/ansible/issues/63364)
|
||||
- nsupdate - Fix zone name lookup of internal/private zones (https://github.com/ansible/ansible/issues/62052)
|
||||
- one_vm - improve file handling by using a context manager.
|
||||
- ovirt - don't ignore ``instance_cpus`` parameter
|
||||
- pacman - Fix pacman output parsing on localized environment. (https://github.com/ansible/ansible/issues/65237)
|
||||
- pacman - fix module crash with ``IndexError: list index out of range`` (https://github.com/ansible/ansible/issues/63077)
|
||||
- pamd - Bugfix for attribute error when removing the first or last line
|
||||
- parted - added 'undefined' align option to support parted versions < 2.1 (https://github.com/ansible-collections/community.general/pull/405).
|
||||
- parted - consider current partition state even in check mode (https://github.com/ansible-collections/community.general/issues/183).
|
||||
- passwordstore lookup - Honor equal sign in userpass
|
||||
- pmrun plugin - The success_command string was no longer quoted. This caused unusual use-cases like ``become_flags=su - root -c`` to fail.
|
||||
- postgres - use query params with cursor.execute in module_utils.postgres.PgMembership class (https://github.com/ansible/ansible/pull/65164).
|
||||
- postgres.py - add a new keyword argument ``query_params`` (https://github.com/ansible/ansible/pull/64661).
|
||||
- postgres_user - Remove false positive ``no_log`` warning for ``no_password_changes`` option
|
||||
- postgresql_db - Removed exception for 'LibraryError' (https://github.com/ansible/ansible/issues/65223).
|
||||
- postgresql_db - allow to pass users names which contain dots (https://github.com/ansible/ansible/issues/63204).
|
||||
- postgresql_idx.py - use the ``query_params`` arg of exec_sql function (https://github.com/ansible/ansible/pull/64661).
|
||||
- postgresql_lang - use query params with cursor.execute (https://github.com/ansible/ansible/pull/65093).
|
||||
- postgresql_membership - make the ``groups`` and ``target_roles`` parameters required (https://github.com/ansible/ansible/pull/67046).
|
||||
- postgresql_membership - remove unused import of exec_sql function (https://github.com/ansible-collections/community.general/pull/178).
|
||||
- postgresql_owner - use query_params with cursor object (https://github.com/ansible/ansible/pull/65310).
|
||||
- postgresql_privs - fix sorting lists with None elements for python3 (https://github.com/ansible/ansible/issues/65761).
|
||||
- postgresql_privs - sort results before comparing so that the values are compared and not the result of ``.sort()`` (https://github.com/ansible/ansible/pull/65125)
|
||||
- postgresql_privs.py - fix reports as changed behavior of module when using ``type=default_privs`` (https://github.com/ansible/ansible/issues/64371).
|
||||
- postgresql_publication - fix typo in module.warn method name (https://github.com/ansible/ansible/issues/64582).
|
||||
- postgresql_publication - use query params arg with cursor object (https://github.com/ansible/ansible/issues/65404).
|
||||
- postgresql_query - improve file handling by using a context manager.
|
||||
- postgresql_query - the module doesn't support non-ASCII characters in SQL files with Python3 (https://github.com/ansible/ansible/issues/65367).
|
||||
- postgresql_schema - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65679).
|
||||
- postgresql_sequence - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65787).
|
||||
- postgresql_set - fix converting value to uppercase (https://github.com/ansible/ansible/issues/67377).
|
||||
- postgresql_set - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65791).
|
||||
- postgresql_slot - make the ``name`` parameter required (https://github.com/ansible/ansible/pull/67046).
|
||||
- postgresql_slot - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65791).
|
||||
- postgresql_subscription - fix typo in module.warn method name (https://github.com/ansible/ansible/pull/64583).
|
||||
- postgresql_subscription - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65791).
|
||||
- postgresql_table - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65862).
|
||||
- postgresql_tablespace - make the ``tablespace`` parameter required (https://github.com/ansible/ansible/pull/67046).
|
||||
- postgresql_tablespace - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65862).
|
||||
- postgresql_user - allow to pass user name which contains dots (https://github.com/ansible/ansible/issues/63204).
|
||||
- postgresql_user - use query parameters with cursor object (https://github.com/ansible/ansible/pull/65862).
|
||||
- proxmox - fix version detection of proxmox 6 and up (Fixes https://github.com/ansible/ansible/issues/59164)
|
||||
- proxysql - fixed mysql dictcursor
|
||||
- pulp_repo - the ``client_cert`` and ``client_key`` options were used for both requests to the Pulp instance and for the repo to sync with, resulting in errors when they were used. Use the new options ``feed_client_cert`` and ``feed_client_key`` for client certificates that should only be used for repo synchronisation, and not for communication with the Pulp instance. (https://github.com/ansible/ansible/issues/59513)
|
||||
- puppet - fix command line construction for check mode and ``manifest:``
|
||||
- pure - fix incorrect user_string setting in module_utils file (https://github.com/ansible/ansible/pull/66914)
|
||||
- redfish_command - fix EnableAccount if Enabled property is not present in Account resource (https://github.com/ansible/ansible/issues/59822)
|
||||
- redfish_command - fix error when deleting a disabled Redfish account (https://github.com/ansible/ansible/issues/64684)
|
||||
- redfish_command - fix power ResetType mapping logic (https://github.com/ansible/ansible/issues/59804)
|
||||
- redfish_config - fix support for boolean bios attrs (https://github.com/ansible/ansible/pull/68251)
|
||||
- redfish_facts - fix KeyError exceptions in GetLogs (https://github.com/ansible/ansible/issues/59797)
|
||||
- redhat_subscription - do not set the default quantity to ``1`` when no quantity is provided (https://github.com/ansible/ansible/issues/66478)
|
||||
- replace use of deprecated functions from ``ansible.module_utils.basic``.
|
||||
- rshm_repository - reduce execution time when changed is False (https://github.com/ansible-collections/community.general/pull/458).
|
||||
- runas - Fix the ``runas`` ``become_pass`` variable fallback from ``ansible_runas_runas`` to ``ansible_runas_pass``
|
||||
- scaleway - Fix bug causing KeyError exception on JSON http requests. (https://github.com/ansible-collections/community.general/pull/444)
|
||||
- scaleway: use jsonify unmarshaller only for application/json requests to avoid breaking the multiline configuration with requests in text/plain (https://github.com/ansible/ansible/issues/65036)
|
||||
- scaleway_compute - fix transition handling that could cause errors when removing a node (https://github.com/ansible-collections/community.general/pull/444).
|
||||
- scaleway_compute(check_image_id): use get image instead loop on first page of images results
|
||||
- sesu - make use of the prompt specified in the code
|
||||
- slack - Fix ``thread_id`` data type
|
||||
- slackpkg - fix matching some special cases in package names (https://github.com/ansible-collections/community.general/pull/505).
|
||||
- slackpkg - fix name matching in package installation (https://github.com/ansible-collections/community.general/issues/450).
|
||||
- spacewalk inventory - improve file handling by using a context manager.
|
||||
- syslog_json callback - fix plugin exception when running (https://github.com/ansible-collections/community.general/issues/407).
|
||||
- syslogger callback plugin - remove check mode support since it did nothing anyway
|
||||
- terraform - adding support for absolute paths additionally to the relative path within project_path (https://github.com/ansible/ansible/issues/58578)
|
||||
- terraform - reset out and err before plan creation (https://github.com/ansible/ansible/issues/64369)
|
||||
- terraform module - fixes usage for providers not supporting workspaces
|
||||
- yarn - Return correct values when running yarn in check mode (https://github.com/ansible-collections/community.general/pull/153).
|
||||
- yarn - handle no version when installing module by name (https://github.com/ansible/ansible/issues/55097)
|
||||
- zfs_delegate_admin - add missing choices diff/hold/release to the permissions parameter (https://github.com/ansible-collections/community.general/pull/278)
|
||||
|
||||
New Plugins
|
||||
-----------
|
||||
|
||||
Callback
|
||||
~~~~~~~~
|
||||
|
||||
- diy - Customize the output
|
||||
|
||||
Lookup
|
||||
~~~~~~
|
||||
|
||||
- etcd3 - Get key values from etcd3 server
|
||||
- lmdb_kv - fetch data from LMDB
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
Cloud
|
||||
~~~~~
|
||||
|
||||
huawei
|
||||
^^^^^^
|
||||
|
||||
- hwc_ecs_instance - Creates a resource of Ecs/Instance in Huawei Cloud
|
||||
- hwc_evs_disk - Creates a resource of Evs/Disk in Huawei Cloud
|
||||
- hwc_vpc_eip - Creates a resource of Vpc/EIP in Huawei Cloud
|
||||
- hwc_vpc_peering_connect - Creates a resource of Vpc/PeeringConnect in Huawei Cloud
|
||||
- hwc_vpc_port - Creates a resource of Vpc/Port in Huawei Cloud
|
||||
- hwc_vpc_private_ip - Creates a resource of Vpc/PrivateIP in Huawei Cloud
|
||||
- hwc_vpc_route - Creates a resource of Vpc/Route in Huawei Cloud
|
||||
- hwc_vpc_security_group - Creates a resource of Vpc/SecurityGroup in Huawei Cloud
|
||||
- hwc_vpc_security_group_rule - Creates a resource of Vpc/SecurityGroupRule in Huawei Cloud
|
||||
- hwc_vpc_subnet - Creates a resource of Vpc/Subnet in Huawei Cloud
|
||||
|
||||
ovh
|
||||
^^^
|
||||
|
||||
- ovh_monthly_billing - Manage OVH monthly billing
|
||||
|
||||
packet
|
||||
^^^^^^
|
||||
|
||||
- packet_ip_subnet - Assign IP subnet to a bare metal server.
|
||||
- packet_project - Create/delete a project in Packet host.
|
||||
- packet_volume - Create/delete a volume in Packet host.
|
||||
- packet_volume_attachment - Attach/detach a volume to a device in the Packet host.
|
||||
|
||||
Database
|
||||
~~~~~~~~
|
||||
|
||||
misc
|
||||
^^^^
|
||||
|
||||
- redis_info - Gather information about Redis servers
|
||||
|
||||
mysql
|
||||
^^^^^
|
||||
|
||||
- mysql_query - Run MySQL queries
|
||||
|
||||
postgresql
|
||||
^^^^^^^^^^
|
||||
|
||||
- postgresql_subscription - Add, update, or remove PostgreSQL subscription
|
||||
- postgresql_user_obj_stat_info - Gather statistics about PostgreSQL user objects
|
||||
|
||||
Files
|
||||
~~~~~
|
||||
|
||||
- iso_create - Generate ISO file with specified files or folders
|
||||
|
||||
Net Tools
|
||||
~~~~~~~~~
|
||||
|
||||
- hetzner_firewall - Manage Hetzner's dedicated server firewall
|
||||
- hetzner_firewall_info - Manage Hetzner's dedicated server firewall
|
||||
- ipwcli_dns - Manage DNS Records for Ericsson IPWorks via ipwcli
|
||||
|
||||
ldap
|
||||
^^^^
|
||||
|
||||
- ldap_attrs - Add or remove multiple LDAP attribute values
|
||||
- ldap_search - Search for entries in a LDAP server
|
||||
|
||||
Packaging
|
||||
~~~~~~~~~
|
||||
|
||||
os
|
||||
^^
|
||||
|
||||
- mas - Manage Mac App Store applications with mas-cli
|
||||
|
||||
System
|
||||
~~~~~~
|
||||
|
||||
- dpkg_divert - Override a debian package's version of a file
|
||||
- lbu - Local Backup Utility for Alpine Linux
|
||||
89
README.md
89
README.md
@@ -1,4 +1,87 @@
|
||||
[](https://github.com/ansible-collection-migration/community.general/actions?query=workflow%3A%22Collection%20test%20suite%22)
|
||||
# Community General Collection
|
||||
|
||||
Ansible Collection: community.general
|
||||
=================================================
|
||||
[](https://app.shippable.com/github/ansible-collections/community.general/dashboard) [](https://codecov.io/gh/ansible-collections/community.general)
|
||||
|
||||
This repo contains the `community.general` Ansible Collection. The collection includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.
|
||||
|
||||
## Tested with Ansible
|
||||
|
||||
Tested with the current Ansible 2.9 and 2.10 releases and the current development version of Ansible. Ansible versions before 2.9.10 are not supported.
|
||||
|
||||
## External requirements
|
||||
|
||||
Some modules and plugins require external libraries. Please check the requirements for each plugin or module you use in the documentation to find out which requirements are needed.
|
||||
|
||||
## Included content
|
||||
|
||||
Please check the included content on the [Ansible Galaxy page for this collection](https://galaxy.ansible.com/community/general).
|
||||
|
||||
## Using this collection
|
||||
|
||||
Before using the General community collection, you need to install the collection with the `ansible-galaxy` CLI:
|
||||
|
||||
ansible-galaxy collection install community.general
|
||||
|
||||
You can also include it in a `requirements.yml` file and install it via `ansible-galaxy collection install -r requirements.yml` using the format:
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: community.general
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html) for more details.
|
||||
|
||||
## Contributing to this collection
|
||||
|
||||
If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured [`COLLECTIONS_PATH`](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#collections-paths), and work on it there.
|
||||
|
||||
You can find more information in the [developer guide for collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html).
|
||||
|
||||
### Running tests
|
||||
|
||||
See [here](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#testing-collections).
|
||||
|
||||
### Communication
|
||||
|
||||
We have a dedicated Working Group for Ansible development.
|
||||
|
||||
You can find other people interested on the following Freenode IRC channels -
|
||||
- `#ansible` - For general use questions and support.
|
||||
- `#ansible-devel` - For discussions on developer topics and code related to features or bugs.
|
||||
- `#ansible-community` - For discussions on community topics and community meetings.
|
||||
|
||||
For more information about communities, meetings and agendas see [Community Wiki](https://github.com/ansible/community/wiki/Community).
|
||||
|
||||
For more information about [communication](https://docs.ansible.com/ansible/latest/community/communication.html)
|
||||
|
||||
### Publishing New Version
|
||||
|
||||
Basic instructions without release branches:
|
||||
|
||||
1. Create `changelogs/fragments/<version>.yml` with `release_summary:` section (which must be a string, not a list).
|
||||
2. Run `antsibull-changelog release --collection-flatmap yes`
|
||||
3. Make sure `CHANGELOG.rst` and `changelogs/changelog.yaml` are added to git, and the deleted fragments have been removed.
|
||||
4. Tag the commit with `<version>`. Push changes and tag to the main repository.
|
||||
|
||||
## Release notes
|
||||
|
||||
See the [changelog](https://github.com/ansible-collections/community.general/blob/main/CHANGELOG.rst).
|
||||
|
||||
## Roadmap
|
||||
|
||||
See [this issue](https://github.com/ansible-collections/community.general/issues/582) for information on releasing, versioning and deprecation.
|
||||
|
||||
In general, we plan to release a major version every six months, and minor versions every two months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes.
|
||||
|
||||
## More information
|
||||
|
||||
- [Ansible Collection overview](https://github.com/ansible-collections/overview)
|
||||
- [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)
|
||||
- [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
|
||||
- [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
|
||||
|
||||
## Licensing
|
||||
|
||||
GNU General Public License v3.0 or later.
|
||||
|
||||
See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.
|
||||
|
||||
1
changelogs/.gitignore
vendored
Normal file
1
changelogs/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/.plugin-cache.yaml
|
||||
1106
changelogs/changelog.yaml
Normal file
1106
changelogs/changelog.yaml
Normal file
File diff suppressed because it is too large
Load Diff
29
changelogs/config.yaml
Normal file
29
changelogs/config.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
changelog_filename_template: ../CHANGELOG.rst
|
||||
changelog_filename_version_depth: 0
|
||||
changes_file: changelog.yaml
|
||||
changes_format: combined
|
||||
keep_fragments: false
|
||||
mention_ancestor: true
|
||||
flatmap: true
|
||||
new_plugins_after_name: removed_features
|
||||
notesdir: fragments
|
||||
prelude_section_name: release_summary
|
||||
prelude_section_title: Release Summary
|
||||
sections:
|
||||
- - major_changes
|
||||
- Major Changes
|
||||
- - minor_changes
|
||||
- Minor Changes
|
||||
- - breaking_changes
|
||||
- Breaking Changes / Porting Guide
|
||||
- - deprecated_features
|
||||
- Deprecated Features
|
||||
- - removed_features
|
||||
- Removed Features (previously deprecated)
|
||||
- - security_fixes
|
||||
- Security Fixes
|
||||
- - bugfixes
|
||||
- Bugfixes
|
||||
- - known_issues
|
||||
- Known Issues
|
||||
title: Community General
|
||||
27
galaxy.yml
27
galaxy.yml
@@ -1,29 +1,20 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 0.1.1
|
||||
version: 1.1.0
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
description: null
|
||||
license: GPL-3.0-or-later
|
||||
license_file: COPYING
|
||||
tags: null
|
||||
#dependencies:
|
||||
# netapp.ontap: '>=0.1.0'
|
||||
# community.kubernetes: '>=0.1.0'
|
||||
# ovirt.ovirt: '>=0.1.0'
|
||||
# ansible.netcommon: '>=0.1.0'
|
||||
# cisco.mso: '>=0.1.0'
|
||||
# ansible.posix: '>=0.1.0'
|
||||
# cisco.aci: '>=0.1.0'
|
||||
# cisco.intersight: '>=0.1.0'
|
||||
# check_point.mgmt: '>=0.1.0'
|
||||
# fortinet.fortios: '>=0.1.0'
|
||||
# openstack.cloud: '>=0.1.0'
|
||||
# google.cloud: '>=0.1.0'
|
||||
# f5networks.f5_modules: '>=0.1.0'
|
||||
tags: [community]
|
||||
# NOTE: No more dependencies can be added to this list
|
||||
dependencies:
|
||||
ansible.netcommon: '>=1.0.0'
|
||||
ansible.posix: '>=1.0.0'
|
||||
community.kubernetes: '>=1.0.0'
|
||||
google.cloud: '>=1.0.0'
|
||||
repository: https://github.com/ansible-collections/community.general
|
||||
documentation: https://github.com/ansible-collection-migration/community.general/tree/master/docs
|
||||
#documentation: https://github.com/ansible-collection-migration/community.general/tree/main/docs
|
||||
homepage: https://github.com/ansible-collections/community.general
|
||||
issues: https://github.com/ansible-collections/community.general/issues
|
||||
#type: flatmap
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
docker:
|
||||
- docker_swarm
|
||||
- docker_image_facts
|
||||
- docker_service
|
||||
- docker_compose
|
||||
- docker_config
|
||||
- docker_container
|
||||
- docker_container_info
|
||||
- docker_host_info
|
||||
- docker_image
|
||||
- docker_image_info
|
||||
- docker_login
|
||||
- docker_network
|
||||
- docker_network_info
|
||||
- docker_node
|
||||
- docker_node_info
|
||||
- docker_prune
|
||||
- docker_secret
|
||||
- docker_swarm
|
||||
- docker_swarm_info
|
||||
- docker_swarm_service
|
||||
- docker_swarm_service_info
|
||||
- docker_volume
|
||||
- docker_volume_info
|
||||
k8s:
|
||||
- kubevirt_cdi_upload
|
||||
- kubevirt_preset
|
||||
- kubevirt_pvc
|
||||
- kubevirt_rs
|
||||
- kubevirt_template
|
||||
- kubevirt_vm
|
||||
os:
|
||||
- os_flavor_facts
|
||||
- os_image_facts
|
||||
- os_keystone_domain_facts
|
||||
- os_networks_facts
|
||||
- os_port_facts
|
||||
- os_project_facts
|
||||
- os_server_facts
|
||||
- os_subnets_facts
|
||||
- os_user_facts
|
||||
ovirt:
|
||||
- ovirt_affinity_label_facts
|
||||
- ovirt_api_facts
|
||||
- ovirt_cluster_facts
|
||||
- ovirt_datacenter_facts
|
||||
- ovirt_disk_facts
|
||||
- ovirt_event_facts
|
||||
- ovirt_external_provider_facts
|
||||
- ovirt_group_facts
|
||||
- ovirt_host_facts
|
||||
- ovirt_host_storage_facts
|
||||
- ovirt_network_facts
|
||||
- ovirt_nic_facts
|
||||
- ovirt_permission_facts
|
||||
- ovirt_quota_facts
|
||||
- ovirt_scheduling_policy_facts
|
||||
- ovirt_snapshot_facts
|
||||
- ovirt_storage_domain_facts
|
||||
- ovirt_storage_template_facts
|
||||
- ovirt_storage_vm_facts
|
||||
- ovirt_tag_facts
|
||||
- ovirt_template_facts
|
||||
- ovirt_user_facts
|
||||
- ovirt_vm_facts
|
||||
- ovirt_vmpool_facts
|
||||
962
meta/routing.yml
962
meta/routing.yml
@@ -1,962 +0,0 @@
|
||||
plugin_routing:
|
||||
modules:
|
||||
ali_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
cs_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
cs_zone_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_account_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_certificate_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_firewall_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_floating_ip_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_load_balancer_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_region_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_size_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_snapshot_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_sshkey_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_tag_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_volume_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
docker_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
docker_service:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcdns_record:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcdns_zone:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gce:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_backend_service:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_bigquery_dataset_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_bigquery_table_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_cloudbuild_trigger_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_address_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_backend_bucket_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_backend_service_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_disk_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_firewall_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_forwarding_rule_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_global_address_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_global_forwarding_rule_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_health_check_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_http_health_check_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_https_health_check_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_group_manager_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_template_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_interconnect_attachment_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_region_disk_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_route_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_router_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_ssl_certificate_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_ssl_policy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_subnetwork_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_http_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_https_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_pool_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_ssl_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_tcp_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_vpn_gateway_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_url_map_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_vpn_tunnel_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_container_cluster_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_container_node_pool_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_dns_managed_zone_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_dns_resource_record_set_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_forwarding_rule:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_healthcheck:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_iam_role_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_iam_service_account_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_pubsub_subscription_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_pubsub_topic_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_redis_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_resourcemanager_project_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sourcerepo_repository_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_spanner_database_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_spanner_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sql_database_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sql_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sql_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_target_proxy:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_tpu_node_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_url_map:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcpubsub_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcspanner:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
memset_memstore_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
memset_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
online_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
online_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
one_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_flavor_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_keystone_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_networks_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_port_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_project_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_subnets_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_affinity_label_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_api_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_cluster_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_datacenter_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_disk_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_event_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_external_provider_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_host_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_host_storage_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_nic_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_permission_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_quota_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_scheduling_policy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_snapshot_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_template_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_vm_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_tag_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_template_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_vm_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_vmpool_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_ip_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_organization_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_security_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_snapshot_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_volume_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
smartos_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_account_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_dns_domain:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_dns_record:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_firewall_group:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_firewall_rule:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_server:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_ssh_key:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_startup_script:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vr_user:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_account_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_block_storage_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_dns_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_firewall_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_os_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_plan_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_region_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_ssh_key_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_startup_script_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vultr_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
xenserver_guest_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
vertica_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
onepassword_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
zabbix_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
zabbix_host_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
ldap_attr:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
aci_intf_policy_fc:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
aci_intf_policy_l2:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
aci_intf_policy_lldp:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
aci_intf_policy_mcp:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
aci_intf_policy_port_channel:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
aci_intf_policy_port_security:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_asm_policy:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_device_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_gtm_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_iapplx_package:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_security_address_list:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_security_port_list:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigip_traffic_group:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
bigiq_device_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_cluster:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_ospf:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_ospfarea:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_show:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_trunk:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_vlag:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_vlan:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_vrouter:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_vrouterbgp:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_vrouterif:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
pn_vrouterlbif:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_admin:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_admpwd:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_cert_gen_ssh:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_check:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_commit:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_dag:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_dag_tags:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_import:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_interface:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_lic:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_loadcfg:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_match_rule:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_mgtconfig:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_nat_rule:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_object:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_op:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_pg:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_query_rules:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_restart:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_sag:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_security_rule:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
panos_set:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
osx_say:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
foreman:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
katello:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
hpilo_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_datacenter_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_enclosure_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_ethernet_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_fc_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_fcoe_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_logical_interconnect_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_network_set_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_san_manager_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
idrac_redfish_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
redfish_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
github_hooks:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
github_webhook_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gitlab_hooks:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gluster_heal_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_aggregate:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_license:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_lun:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_qtree:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_svm:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_user:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_user_role:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_volume:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
na_ontap_gather_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
sf_account_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
sf_check_connections:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
sf_snapshot_schedule_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
sf_volume_access_group_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
sf_volume_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
purefa_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
purefb_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
python_requirements_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
jenkins_job_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
nginx_status_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
742
meta/runtime.yml
Normal file
742
meta/runtime.yml
Normal file
@@ -0,0 +1,742 @@
|
||||
requires_ansible: '>=2.9.10'
|
||||
action_groups:
|
||||
docker:
|
||||
- docker_swarm
|
||||
- docker_image_facts
|
||||
- docker_service
|
||||
- docker_compose
|
||||
- docker_config
|
||||
- docker_container
|
||||
- docker_container_info
|
||||
- docker_host_info
|
||||
- docker_image
|
||||
- docker_image_info
|
||||
- docker_login
|
||||
- docker_network
|
||||
- docker_network_info
|
||||
- docker_node
|
||||
- docker_node_info
|
||||
- docker_prune
|
||||
- docker_secret
|
||||
- docker_swarm
|
||||
- docker_swarm_info
|
||||
- docker_swarm_service
|
||||
- docker_swarm_service_info
|
||||
- docker_volume
|
||||
- docker_volume_info
|
||||
k8s:
|
||||
- kubevirt_cdi_upload
|
||||
- kubevirt_preset
|
||||
- kubevirt_pvc
|
||||
- kubevirt_rs
|
||||
- kubevirt_template
|
||||
- kubevirt_vm
|
||||
ovirt:
|
||||
- ovirt_affinity_label_facts
|
||||
- ovirt_api_facts
|
||||
- ovirt_cluster_facts
|
||||
- ovirt_datacenter_facts
|
||||
- ovirt_disk_facts
|
||||
- ovirt_event_facts
|
||||
- ovirt_external_provider_facts
|
||||
- ovirt_group_facts
|
||||
- ovirt_host_facts
|
||||
- ovirt_host_storage_facts
|
||||
- ovirt_network_facts
|
||||
- ovirt_nic_facts
|
||||
- ovirt_permission_facts
|
||||
- ovirt_quota_facts
|
||||
- ovirt_scheduling_policy_facts
|
||||
- ovirt_snapshot_facts
|
||||
- ovirt_storage_domain_facts
|
||||
- ovirt_storage_template_facts
|
||||
- ovirt_storage_vm_facts
|
||||
- ovirt_tag_facts
|
||||
- ovirt_template_facts
|
||||
- ovirt_user_facts
|
||||
- ovirt_vm_facts
|
||||
- ovirt_vmpool_facts
|
||||
plugin_routing:
|
||||
lookup:
|
||||
conjur_variable:
|
||||
redirect: cyberark.conjur.conjur_variable
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The conjur_variable lookup has been moved to the cyberark.conjur collection.
|
||||
modules:
|
||||
ali_instance_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean
|
||||
digital_ocean_account_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_account_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_account_facts
|
||||
digital_ocean_account_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_account_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_account_info
|
||||
digital_ocean_block_storage:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_block_storage module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_block_storage
|
||||
digital_ocean_certificate:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_certificate module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_certificate
|
||||
digital_ocean_certificate_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_certificate_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_certificate_facts
|
||||
digital_ocean_certificate_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_certificate_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_certificate_info
|
||||
digital_ocean_domain:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_domain module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_domain
|
||||
digital_ocean_domain_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_domain_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_domain_facts
|
||||
digital_ocean_domain_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_domain_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_domain_info
|
||||
digital_ocean_droplet:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_droplet module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_droplet
|
||||
digital_ocean_firewall_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_firewall_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_firewall_facts
|
||||
digital_ocean_firewall_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_firewall_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_firewall_info
|
||||
digital_ocean_floating_ip:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_floating_ip module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_floating_ip
|
||||
digital_ocean_floating_ip_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_floating_ip_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_floating_ip_facts
|
||||
digital_ocean_floating_ip_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_floating_ip_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_floating_ip_info
|
||||
digital_ocean_image_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_image_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_image_facts
|
||||
digital_ocean_image_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_image_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_image_info
|
||||
digital_ocean_load_balancer_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_load_balancer_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_load_balancer_facts
|
||||
digital_ocean_load_balancer_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_load_balancer_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_load_balancer_info
|
||||
digital_ocean_region_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_region_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_region_facts
|
||||
digital_ocean_region_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_region_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_region_info
|
||||
digital_ocean_size_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_size_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_size_facts
|
||||
digital_ocean_size_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_size_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_size_info
|
||||
digital_ocean_snapshot_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_snapshot_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_snapshot_facts
|
||||
digital_ocean_snapshot_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_snapshot_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_snapshot_info
|
||||
digital_ocean_sshkey:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_sshkey module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_sshkey
|
||||
digital_ocean_sshkey_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_sshkey_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_sshkey_facts
|
||||
digital_ocean_sshkey_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_sshkey_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_sshkey_info
|
||||
digital_ocean_tag:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_tag module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_tag
|
||||
digital_ocean_tag_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_tag_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_tag_facts
|
||||
digital_ocean_tag_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_tag_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_tag_info
|
||||
digital_ocean_volume_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_volume_facts module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_volume_facts
|
||||
digital_ocean_volume_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean_volume_info module has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean_volume_info
|
||||
docker_image_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
docker_service:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
firewalld:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The firewalld module has been moved to the ansible.posix collection.
|
||||
redirect: ansible.posix.firewalld
|
||||
foreman:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcdns_record:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcdns_zone:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gce:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_backend_service:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_forwarding_rule:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_healthcheck:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_target_proxy:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_url_map:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcpubsub_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcspanner:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
github_hooks:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
helm:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: The helm module in community.general has been deprecated. Use community.kubernetes.helm instead.
|
||||
hpilo_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
idrac_redfish_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
infini_export:
|
||||
redirect: infinidat.infinibox.infini_export
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infini_export module has been moved to the infinidat collection.
|
||||
infini_export_client:
|
||||
redirect: infinidat.infinibox.infini_export_client
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infini_export_client module has been moved to the infinidat collection.
|
||||
infini_fs:
|
||||
redirect: infinidat.infinibox.infini_fs
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infini_fs module has been moved to the infinidat collection.
|
||||
infini_host:
|
||||
redirect: infinidat.infinibox.infini_host
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infini_host module has been moved to the infinidat collection.
|
||||
infini_pool:
|
||||
redirect: infinidat.infinibox.infini_pool
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infini_pool module has been moved to the infinidat collection.
|
||||
infini_vol:
|
||||
redirect: infinidat.infinibox.infini_vol
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infini_vol module has been moved to the infinidat collection.
|
||||
jenkins_job_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
katello:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ldap_attr:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
logicmonitor:
|
||||
tombstone:
|
||||
removal_version: 1.0.0
|
||||
warning_text: The logicmonitor_facts module is no longer maintained and the API used has been disabled in 2017.
|
||||
logicmonitor_facts:
|
||||
tombstone:
|
||||
removal_version: 1.0.0
|
||||
warning_text: The logicmonitor_facts module is no longer maintained and the API used has been disabled in 2017.
|
||||
memset_memstore_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
memset_server_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
mysql_db:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql_db module has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql_db
|
||||
mysql_info:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql_info module has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql_info
|
||||
mysql_query:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql_query module has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql_query
|
||||
mysql_replication:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql_replication module has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql_replication
|
||||
mysql_user:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql_user module has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql_user
|
||||
mysql_variables:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql_variables module has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql_variables
|
||||
na_cdot_aggregate:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_license:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_lun:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_qtree:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_svm:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_user:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_user_role:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_volume:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_ontap_gather_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
nginx_status_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
one_image_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
onepassword_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_datacenter_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_enclosure_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_ethernet_network_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_fc_network_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_fcoe_network_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_logical_interconnect_group_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_network_set_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_san_manager_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
online_server_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
online_user_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_affinity_label_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_api_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_cluster_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_datacenter_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_disk_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_event_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_external_provider_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_group_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_host_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_host_storage_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_network_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_nic_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_permission_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_quota_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_scheduling_policy_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_snapshot_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_domain_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_template_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_vm_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_tag_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_template_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_user_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_vm_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_vmpool_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
proxysql_backend_servers:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_backend_servers module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_backend_servers
|
||||
proxysql_global_variables:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_global_variables module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_global_variables
|
||||
proxysql_manage_config:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_manage_config module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_manage_config
|
||||
proxysql_mysql_users:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_mysql_users module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_mysql_users
|
||||
proxysql_query_rules:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_query_rules module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_query_rules
|
||||
proxysql_replication_hostgroups:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_replication_hostgroups module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_replication_hostgroups
|
||||
proxysql_scheduler:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql_scheduler module has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql_scheduler
|
||||
purefa_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
purefb_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
python_requirements_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
redfish_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_image_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_ip_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_organization_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_security_group_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_server_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_snapshot_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_volume_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_account_manager:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_check_connections:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_snapshot_schedule_manager:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_volume_access_group_manager:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_volume_manager:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
smartos_image_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
vertica_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
xenserver_guest_facts:
|
||||
deprecation:
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
doc_fragments:
|
||||
digital_ocean:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean docs_fragment has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean
|
||||
infinibox:
|
||||
redirect: infinidat.infinibox.infinibox
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infinibox doc_fragments plugin has been moved to the infinidat.infinibox collection.
|
||||
mysql:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql docs_fragment has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql
|
||||
proxysql:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The proxysql docs_fragment has been moved to the community.proxysql collection.
|
||||
redirect: community.proxysql.proxysql
|
||||
module_utils:
|
||||
digital_ocean:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The digital_ocean module_utils has been moved to the community.digitalocean collection.
|
||||
redirect: community.digitalocean.digital_ocean
|
||||
firewalld:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The firewalld module_utils has been moved to the ansible.posix collection.
|
||||
redirect: ansible.posix.firewalld
|
||||
infinibox:
|
||||
redirect: infinidat.infinibox.infinibox
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The infinibox module_utils plugin has been moved to the infinidat.infinibox collection.
|
||||
mysql:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: The mysql module_utils has been moved to the community.mysql collection.
|
||||
redirect: community.mysql.mysql
|
||||
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# (c) 2016 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.community.general.plugins.module_utils.network.aireos.aireos import aireos_provider_spec
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'aireos_config' else False
|
||||
|
||||
if self._play_context.connection != 'local':
|
||||
return dict(
|
||||
failed=True,
|
||||
msg='invalid connection specified, expected connection=local, '
|
||||
'got %s' % self._play_context.connection
|
||||
)
|
||||
|
||||
provider = load_provider(aireos_provider_spec, self._task.args)
|
||||
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'aireos'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = int(provider['port'] or self._play_context.port or 22)
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
|
||||
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
|
||||
if self._play_context.become_method == 'enable':
|
||||
self._play_context.become = False
|
||||
self._play_context.become_method = None
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
|
||||
return result
|
||||
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# (c) 2016 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.community.general.plugins.module_utils.network.aruba.aruba import aruba_provider_spec
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'aruba_config' else False
|
||||
|
||||
if self._play_context.connection != 'local':
|
||||
return dict(
|
||||
failed=True,
|
||||
msg='invalid connection specified, expected connection=local, '
|
||||
'got %s' % self._play_context.connection
|
||||
)
|
||||
|
||||
provider = load_provider(aruba_provider_spec, self._task.args)
|
||||
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'aruba'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = int(provider['port'] or self._play_context.port or 22)
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
|
||||
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
|
||||
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
|
||||
if self._play_context.become_method == 'enable':
|
||||
self._play_context.become = False
|
||||
self._play_context.become_method = None
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
return result
|
||||
@@ -1,89 +0,0 @@
|
||||
#
|
||||
# Copyright: (c) 2016, Red Hat Inc.
|
||||
|
||||
# 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 sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.community.general.plugins.module_utils.network.cloudengine.ce import ce_provider_spec
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
CLI_SUPPORTED_MODULES = ['ce_rollback', 'ce_mlag_interface', 'ce_startup', 'ce_config',
|
||||
'ce_command', 'ce_facts', 'ce_evpn_global', 'ce_evpn_bgp_rr',
|
||||
'ce_mtu', 'ce_evpn_bgp', 'ce_snmp_location', 'ce_snmp_contact',
|
||||
'ce_snmp_traps', 'ce_netstream_global', 'ce_netstream_aging',
|
||||
'ce_netstream_export', 'ce_netstream_template', 'ce_ntp_auth',
|
||||
'ce_stp', 'ce_vxlan_global', 'ce_vxlan_arp', 'ce_vxlan_gateway',
|
||||
'ce_acl_interface']
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'ce_config' else False
|
||||
socket_path = None
|
||||
persistent_connection = self._play_context.connection.split('.')[-1]
|
||||
|
||||
if self._play_context.connection == 'local':
|
||||
provider = load_provider(ce_provider_spec, self._task.args)
|
||||
transport = provider['transport'] or 'cli'
|
||||
|
||||
display.vvvv('connection transport is %s' % transport, self._play_context.remote_addr)
|
||||
|
||||
if transport == 'cli':
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'ce'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = int(provider['port'] or self._play_context.port or 22)
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
|
||||
self._task.args['provider'] = provider.update(
|
||||
host=pc.remote_addr,
|
||||
port=pc.port,
|
||||
username=pc.remote_user,
|
||||
password=pc.password
|
||||
)
|
||||
if module_name in ['ce_netconf'] or module_name not in CLI_SUPPORTED_MODULES:
|
||||
pc.connection = 'netconf'
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
# make sure a transport value is set in args
|
||||
self._task.args['transport'] = transport
|
||||
self._task.args['provider'] = provider
|
||||
elif persistent_connection in ('netconf', 'network_cli'):
|
||||
provider = self._task.args.get('provider', {})
|
||||
if any(provider.values()):
|
||||
display.warning('provider is unnecessary when using %s and will be ignored' % self._play_context.connection)
|
||||
del self._task.args['provider']
|
||||
|
||||
if (persistent_connection == 'network_cli' and module_name not in CLI_SUPPORTED_MODULES) or \
|
||||
(persistent_connection == 'netconf' and module_name in CLI_SUPPORTED_MODULES):
|
||||
return {'failed': True, 'msg': "Connection type '%s' is not valid for '%s' module."
|
||||
% (self._play_context.connection, self._task.action)}
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
return result
|
||||
@@ -1,104 +0,0 @@
|
||||
#
|
||||
# Copyright 2015 Peter Sprygada <psprygada@ansible.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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import time
|
||||
import glob
|
||||
from ansible.module_utils.six.moves.urllib.parse import urlsplit
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.community.general.plugins.action.ce import ActionModule as _ActionModule
|
||||
|
||||
|
||||
class ActionModule(_ActionModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
|
||||
try:
|
||||
self._handle_template()
|
||||
except (ValueError, AttributeError) as exc:
|
||||
return dict(failed=True, msg=exc.message)
|
||||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
if self._task.args.get('backup') and result.get('__backup__'):
|
||||
# User requested backup and no error occurred in module.
|
||||
# NOTE: If there is a parameter error, __backup__ key may not be in results.
|
||||
self._write_backup(task_vars['inventory_hostname'], result['__backup__'])
|
||||
|
||||
if '__backup__' in result:
|
||||
del result['__backup__']
|
||||
|
||||
return result
|
||||
|
||||
def _get_working_path(self):
|
||||
cwd = self._loader.get_basedir()
|
||||
if self._task._role is not None:
|
||||
cwd = self._task._role._role_path
|
||||
return cwd
|
||||
|
||||
def _write_backup(self, host, contents):
|
||||
backup_path = self._get_working_path() + '/backup'
|
||||
if not os.path.exists(backup_path):
|
||||
os.mkdir(backup_path)
|
||||
for fn in glob.glob('%s/%s*' % (backup_path, host)):
|
||||
os.remove(fn)
|
||||
tstamp = time.strftime("%Y-%m-%d@%H:%M:%S", time.localtime(time.time()))
|
||||
filename = '%s/%s_config.%s' % (backup_path, host, tstamp)
|
||||
open(filename, 'w').write(contents)
|
||||
|
||||
def _handle_template(self):
|
||||
src = self._task.args.get('src')
|
||||
if not src:
|
||||
raise ValueError('missing required arguments: src')
|
||||
|
||||
working_path = self._get_working_path()
|
||||
|
||||
if os.path.isabs(src) or urlsplit(src).scheme:
|
||||
source = src
|
||||
else:
|
||||
source = self._loader.path_dwim_relative(working_path, 'templates', src)
|
||||
if not source:
|
||||
source = self._loader.path_dwim_relative(working_path, src)
|
||||
|
||||
if not os.path.exists(source):
|
||||
return
|
||||
|
||||
try:
|
||||
with open(source, 'r') as f:
|
||||
template_data = to_text(f.read())
|
||||
except IOError:
|
||||
return dict(failed=True, msg='unable to load src file')
|
||||
|
||||
# Create a template search path in the following order:
|
||||
# [working_path, self_role_path, dependent_role_paths, dirname(source)]
|
||||
searchpath = [working_path]
|
||||
if self._task._role is not None:
|
||||
searchpath.append(self._task._role._role_path)
|
||||
if hasattr(self._task, "_block:"):
|
||||
dep_chain = self._task._block.get_dep_chain()
|
||||
if dep_chain is not None:
|
||||
for role in dep_chain:
|
||||
searchpath.append(role._role_path)
|
||||
searchpath.append(os.path.dirname(source))
|
||||
with self._templar.set_temporary_context(searchpath=searchpath):
|
||||
self._task.args['src'] = self._templar.template(template_data)
|
||||
@@ -1,69 +0,0 @@
|
||||
# (C) 2017 Red Hat Inc.
|
||||
# Copyright (C) 2017 Lenovo.
|
||||
#
|
||||
# GNU General Public License v3.0+
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
#
|
||||
# Contains Action Plugin methods for CNOS Config Module
|
||||
# Lenovo Networking
|
||||
#
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.community.general.plugins.module_utils.network.cnos.cnos import cnos_provider_spec
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'cnos_config' else False
|
||||
|
||||
if self._play_context.connection == 'local':
|
||||
provider = load_provider(cnos_provider_spec, self._task.args)
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'cnos'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = provider['port'] or self._play_context.port or 22
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
|
||||
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
|
||||
pc.become = provider['authorize'] or True
|
||||
pc.become_pass = provider['auth_pass']
|
||||
pc.become_method = 'enable'
|
||||
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
return result
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# Copyright 2018 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
self._config_module = True
|
||||
|
||||
if self._play_context.connection.split('.')[-1] != 'network_cli':
|
||||
return {'failed': True, 'msg': 'Connection type %s is not valid for this module. Must use fully qualified'
|
||||
' name of network_cli connection type.' % self._play_context.connection}
|
||||
|
||||
return super(ActionModule, self).run(task_vars=task_vars)
|
||||
@@ -1,69 +0,0 @@
|
||||
# (C) 2017 Red Hat Inc.
|
||||
# Copyright (C) 2017 Lenovo.
|
||||
#
|
||||
# GNU General Public License v3.0+
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
#
|
||||
# Contains Action Plugin methods for ENOS Config Module
|
||||
# Lenovo Networking
|
||||
#
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.community.general.plugins.module_utils.network.enos.enos import enos_provider_spec
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'enos_config' else False
|
||||
|
||||
if self._play_context.connection == 'local':
|
||||
provider = load_provider(enos_provider_spec, self._task.args)
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'enos'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = provider['port'] or self._play_context.port or 22
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
|
||||
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
|
||||
pc.become = provider['authorize'] or True
|
||||
pc.become_pass = provider['auth_pass']
|
||||
pc.become_method = 'enable'
|
||||
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
return result
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright 2015 Peter Sprygada <psprygada@ansible.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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
EXOS_NETWORK_CLI_MODULES = (
|
||||
'exos_facts',
|
||||
'exos_config',
|
||||
'exos_command')
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'exos_config' else False
|
||||
persistent_connection = self._play_context.connection.split('.')[-1]
|
||||
|
||||
if persistent_connection not in ('network_cli', 'httpapi'):
|
||||
return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection}
|
||||
|
||||
if persistent_connection == 'network_cli' and module_name not in self.EXOS_NETWORK_CLI_MODULES:
|
||||
return {'failed': True, 'msg': "Connection type %s is not valid for this module" % self._play_context.connection}
|
||||
|
||||
return super(ActionModule, self).run(task_vars=task_vars)
|
||||
1
plugins/action/iptables_state.py
Symbolic link
1
plugins/action/iptables_state.py
Symbolic link
@@ -0,0 +1 @@
|
||||
./system/iptables_state.py
|
||||
@@ -1,80 +0,0 @@
|
||||
#
|
||||
# (c) 2016 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible_collections.community.general.plugins.module_utils.network.ironware.ironware import ironware_provider_spec
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'ironware_config' else False
|
||||
persistent_connection = self._play_context.connection.split('.')[-1]
|
||||
|
||||
if persistent_connection == 'network_cli':
|
||||
provider = self._task.args.get('provider', {})
|
||||
if any(provider.values()):
|
||||
display.warning('provider is unnecessary when using network_cli and will be ignored')
|
||||
del self._task.args['provider']
|
||||
elif self._play_context.connection == 'local':
|
||||
provider = load_provider(ironware_provider_spec, self._task.args)
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'ironware'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = int(provider['port'] or self._play_context.port or 22)
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
|
||||
pc.become = provider['authorize'] or False
|
||||
if pc.become:
|
||||
pc.become_method = 'enable'
|
||||
pc.become_pass = provider['auth_pass']
|
||||
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
|
||||
command_timeout = int(provider['timeout']) if provider['timeout'] else connection.get_option('persistent_command_timeout')
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
else:
|
||||
return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection}
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
return result
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
self._config_module = True
|
||||
return super(ActionModule, self).run(task_vars=task_vars)
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# (c) 2017, Red Hat, Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
self._config_module = True
|
||||
return super(ActionModule, self).run(task_vars=task_vars)
|
||||
1
plugins/action/shutdown.py
Symbolic link
1
plugins/action/shutdown.py
Symbolic link
@@ -0,0 +1 @@
|
||||
./system/shutdown.py
|
||||
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import re
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
|
||||
PRIVATE_KEYS_RE = re.compile('__.+__')
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'slxos_config' else False
|
||||
persistent_connection = self._play_context.connection.split('.')[-1]
|
||||
|
||||
if persistent_connection not in ('network_cli'):
|
||||
return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection}
|
||||
return super(ActionModule, self).run(task_vars=task_vars)
|
||||
@@ -1,77 +0,0 @@
|
||||
#
|
||||
# (c) 2016 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
from ansible_collections.community.general.plugins.module_utils.network.sros.sros import sros_provider_spec
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
persistent_connection = self._play_context.connection.split('.')[-1]
|
||||
|
||||
self._config_module = True if module_name == 'sros_config' else False
|
||||
if persistent_connection == 'network_cli':
|
||||
provider = self._task.args.get('provider', {})
|
||||
if any(provider.values()):
|
||||
display.warning('provider is unnecessary when using network_cli and will be ignored')
|
||||
del self._task.args['provider']
|
||||
elif self._play_context.connection == 'local':
|
||||
provider = load_provider(sros_provider_spec, self._task.args)
|
||||
|
||||
pc = copy.deepcopy(self._play_context)
|
||||
pc.connection = 'network_cli'
|
||||
pc.network_os = 'sros'
|
||||
pc.remote_addr = provider['host'] or self._play_context.remote_addr
|
||||
pc.port = int(provider['port'] or self._play_context.port or 22)
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
|
||||
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
|
||||
|
||||
display.vvv('using connection plugin %s (was local)' % pc.connection, pc.remote_addr)
|
||||
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin, task_uuid=self._task._uuid)
|
||||
connection.set_options(direct={'persistent_command_timeout': command_timeout})
|
||||
|
||||
socket_path = connection.run()
|
||||
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
|
||||
if not socket_path:
|
||||
return {'failed': True,
|
||||
'msg': 'unable to open shell. Please see: ' +
|
||||
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
|
||||
|
||||
task_vars['ansible_socket'] = socket_path
|
||||
else:
|
||||
return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection}
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
return result
|
||||
189
plugins/action/system/iptables_state.py
Normal file
189
plugins/action/system/iptables_state.py
Normal file
@@ -0,0 +1,189 @@
|
||||
# Copyright: (c) 2020, quidame <quidame@poivron.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
|
||||
|
||||
import time
|
||||
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.errors import AnsibleError, AnsibleActionFail, AnsibleConnectionFailure
|
||||
from ansible.utils.vars import merge_hash
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class ActionModule(ActionBase):
|
||||
|
||||
# Keep internal params away from user interactions
|
||||
_VALID_ARGS = frozenset(('path', 'state', 'table', 'noflush', 'counters', 'modprobe', 'ip_version', 'wait'))
|
||||
DEFAULT_SUDOABLE = True
|
||||
|
||||
MSG_ERROR__ASYNC_AND_POLL_NOT_ZERO = (
|
||||
"This module doesn't support async>0 and poll>0 when its 'state' param "
|
||||
"is set to 'restored'. To enable its rollback feature (that needs the "
|
||||
"module to run asynchronously on the remote), please set task attribute "
|
||||
"'poll' (=%s) to 0, and 'async' (=%s) to a value >2 and not greater than "
|
||||
"'ansible_timeout' (=%s) (recommended).")
|
||||
MSG_WARNING__NO_ASYNC_IS_NO_ROLLBACK = (
|
||||
"Attempts to restore iptables state without rollback in case of mistake "
|
||||
"may lead the ansible controller to loose access to the hosts and never "
|
||||
"regain it before fixing firewall rules through a serial console, or any "
|
||||
"other way except SSH. Please set task attribute 'poll' (=%s) to 0, and "
|
||||
"'async' (=%s) to a value >2 and not greater than 'ansible_timeout' (=%s) "
|
||||
"(recommended).")
|
||||
MSG_WARNING__ASYNC_GREATER_THAN_TIMEOUT = (
|
||||
"You attempt to restore iptables state with rollback in case of mistake, "
|
||||
"but with settings that will lead this rollback to happen AFTER that the "
|
||||
"controller will reach its own timeout. Please set task attribute 'poll' "
|
||||
"(=%s) to 0, and 'async' (=%s) to a value >2 and not greater than "
|
||||
"'ansible_timeout' (=%s) (recommended).")
|
||||
|
||||
def _async_result(self, module_args, task_vars, timeout):
|
||||
'''
|
||||
Retrieve results of the asynchonous task, and display them in place of
|
||||
the async wrapper results (those with the ansible_job_id key).
|
||||
'''
|
||||
# At least one iteration is required, even if timeout is 0.
|
||||
for i in range(max(1, timeout)):
|
||||
async_result = self._execute_module(
|
||||
module_name='async_status',
|
||||
module_args=module_args,
|
||||
task_vars=task_vars,
|
||||
wrap_async=False)
|
||||
if async_result['finished'] == 1:
|
||||
break
|
||||
time.sleep(min(1, timeout))
|
||||
|
||||
return async_result
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
|
||||
self._supports_check_mode = True
|
||||
self._supports_async = True
|
||||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
if not result.get('skipped'):
|
||||
|
||||
# FUTURE: better to let _execute_module calculate this internally?
|
||||
wrap_async = self._task.async_val and not self._connection.has_native_async
|
||||
|
||||
# Set short names for values we'll have to compare or reuse
|
||||
task_poll = self._task.poll
|
||||
task_async = self._task.async_val
|
||||
check_mode = self._play_context.check_mode
|
||||
max_timeout = self._connection._play_context.timeout
|
||||
module_name = self._task.action
|
||||
module_args = self._task.args
|
||||
|
||||
if module_args.get('state', None) == 'restored':
|
||||
if not wrap_async:
|
||||
if not check_mode:
|
||||
display.warning(self.MSG_WARNING__NO_ASYNC_IS_NO_ROLLBACK % (
|
||||
task_poll,
|
||||
task_async,
|
||||
max_timeout))
|
||||
elif task_poll:
|
||||
raise AnsibleActionFail(self.MSG_ERROR__ASYNC_AND_POLL_NOT_ZERO % (
|
||||
task_poll,
|
||||
task_async,
|
||||
max_timeout))
|
||||
else:
|
||||
if task_async > max_timeout and not check_mode:
|
||||
display.warning(self.MSG_WARNING__ASYNC_GREATER_THAN_TIMEOUT % (
|
||||
task_poll,
|
||||
task_async,
|
||||
max_timeout))
|
||||
|
||||
# BEGIN snippet from async_status action plugin
|
||||
env_async_dir = [e for e in self._task.environment if
|
||||
"ANSIBLE_ASYNC_DIR" in e]
|
||||
if len(env_async_dir) > 0:
|
||||
# for backwards compatibility we need to get the dir from
|
||||
# ANSIBLE_ASYNC_DIR that is defined in the environment. This is
|
||||
# deprecated and will be removed in favour of shell options
|
||||
async_dir = env_async_dir[0]['ANSIBLE_ASYNC_DIR']
|
||||
|
||||
msg = "Setting the async dir from the environment keyword " \
|
||||
"ANSIBLE_ASYNC_DIR is deprecated. Set the async_dir " \
|
||||
"shell option instead"
|
||||
display.deprecated(msg, version='2.0.0',
|
||||
collection_name='community.general') # was Ansible 2.12
|
||||
else:
|
||||
# inject the async directory based on the shell option into the
|
||||
# module args
|
||||
async_dir = self.get_shell_option('async_dir', default="~/.ansible_async")
|
||||
# END snippet from async_status action plugin
|
||||
|
||||
# Bind the loop max duration to consistent values on both
|
||||
# remote and local sides (if not the same, make the loop
|
||||
# longer on the controller); and set a backup file path.
|
||||
module_args['_timeout'] = task_async
|
||||
module_args['_back'] = '%s/iptables.state' % async_dir
|
||||
async_status_args = dict(_async_dir=async_dir)
|
||||
confirm_cmd = 'rm -f %s' % module_args['_back']
|
||||
remaining_time = max(task_async, max_timeout)
|
||||
|
||||
# do work!
|
||||
result = merge_hash(result, self._execute_module(module_args=module_args, task_vars=task_vars, wrap_async=wrap_async))
|
||||
|
||||
# Then the 3-steps "go ahead or rollback":
|
||||
# - reset connection to ensure a persistent one will not be reused
|
||||
# - confirm the restored state by removing the backup on the remote
|
||||
# - retrieve the results of the asynchronous task to return them
|
||||
if '_back' in module_args:
|
||||
async_status_args['jid'] = result.get('ansible_job_id', None)
|
||||
if async_status_args['jid'] is None:
|
||||
raise AnsibleActionFail("Unable to get 'ansible_job_id'.")
|
||||
|
||||
# Catch early errors due to missing mandatory option, bad
|
||||
# option type/value, missing required system command, etc.
|
||||
result = merge_hash(result, self._async_result(async_status_args, task_vars, 0))
|
||||
|
||||
if not result['finished']:
|
||||
try:
|
||||
self._connection.reset()
|
||||
display.v("%s: reset connection" % (module_name))
|
||||
except AttributeError:
|
||||
display.warning("Connection plugin does not allow to reset the connection.")
|
||||
|
||||
for x in range(max_timeout):
|
||||
time.sleep(1)
|
||||
remaining_time -= 1
|
||||
# - AnsibleConnectionFailure covers rejected requests (i.e.
|
||||
# by rules with '--jump REJECT')
|
||||
# - ansible_timeout is able to cover dropped requests (due
|
||||
# to a rule or policy DROP) if not lower than async_val.
|
||||
try:
|
||||
garbage = self._low_level_execute_command(confirm_cmd, sudoable=self.DEFAULT_SUDOABLE)
|
||||
break
|
||||
except AnsibleConnectionFailure:
|
||||
continue
|
||||
|
||||
result = merge_hash(result, self._async_result(async_status_args, task_vars, remaining_time))
|
||||
|
||||
# Cleanup async related stuff and internal params
|
||||
for key in ('ansible_job_id', 'results_file', 'started', 'finished'):
|
||||
if result.get(key):
|
||||
del result[key]
|
||||
|
||||
if result.get('invocation', {}).get('module_args'):
|
||||
if '_timeout' in result['invocation']['module_args']:
|
||||
del result['invocation']['module_args']['_back']
|
||||
del result['invocation']['module_args']['_timeout']
|
||||
|
||||
async_status_args['mode'] = 'cleanup'
|
||||
garbage = self._execute_module(
|
||||
module_name='async_status',
|
||||
module_args=async_status_args,
|
||||
task_vars=task_vars,
|
||||
wrap_async=False)
|
||||
|
||||
if not wrap_async:
|
||||
# remove a temporary path we created
|
||||
self._remove_tmp_path(self._connection._shell.tmpdir)
|
||||
|
||||
return result
|
||||
211
plugins/action/system/shutdown.py
Normal file
211
plugins/action/system/shutdown.py
Normal file
@@ -0,0 +1,211 @@
|
||||
# Copyright: (c) 2020, Amin Vakil <info@aminvakil.com>
|
||||
# Copyright: (c) 2016-2018, Matt Davis <mdavis@ansible.com>
|
||||
# Copyright: (c) 2018, Sam Doran <sdoran@redhat.com>
|
||||
# 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
|
||||
|
||||
from ansible.errors import AnsibleError, AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_native, to_text
|
||||
from ansible.module_utils.common.collections import is_string
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class TimedOutException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class ActionModule(ActionBase):
|
||||
TRANSFERS_FILES = False
|
||||
_VALID_ARGS = frozenset((
|
||||
'msg',
|
||||
'delay',
|
||||
'search_paths'
|
||||
))
|
||||
|
||||
DEFAULT_CONNECT_TIMEOUT = None
|
||||
DEFAULT_PRE_SHUTDOWN_DELAY = 0
|
||||
DEFAULT_SHUTDOWN_MESSAGE = 'Shut down initiated by Ansible'
|
||||
DEFAULT_SHUTDOWN_COMMAND = 'shutdown'
|
||||
DEFAULT_SHUTDOWN_COMMAND_ARGS = '-h {delay_min} "{message}"'
|
||||
DEFAULT_SUDOABLE = True
|
||||
|
||||
SHUTDOWN_COMMANDS = {
|
||||
'alpine': 'poweroff',
|
||||
'vmkernel': 'halt',
|
||||
}
|
||||
|
||||
SHUTDOWN_COMMAND_ARGS = {
|
||||
'alpine': '',
|
||||
'void': '-h +{delay_min} "{message}"',
|
||||
'freebsd': '-h +{delay_sec}s "{message}"',
|
||||
'linux': DEFAULT_SHUTDOWN_COMMAND_ARGS,
|
||||
'macosx': '-h +{delay_min} "{message}"',
|
||||
'openbsd': '-h +{delay_min} "{message}"',
|
||||
'solaris': '-y -g {delay_sec} -i 5 "{message}"',
|
||||
'sunos': '-y -g {delay_sec} -i 5 "{message}"',
|
||||
'vmkernel': '-d {delay_sec}',
|
||||
'aix': '-Fh',
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ActionModule, self).__init__(*args, **kwargs)
|
||||
|
||||
@property
|
||||
def delay(self):
|
||||
return self._check_delay('delay', self.DEFAULT_PRE_SHUTDOWN_DELAY)
|
||||
|
||||
def _check_delay(self, key, default):
|
||||
"""Ensure that the value is positive or zero"""
|
||||
value = int(self._task.args.get(key, default))
|
||||
if value < 0:
|
||||
value = 0
|
||||
return value
|
||||
|
||||
def _get_value_from_facts(self, variable_name, distribution, default_value):
|
||||
"""Get dist+version specific args first, then distribution, then family, lastly use default"""
|
||||
attr = getattr(self, variable_name)
|
||||
value = attr.get(
|
||||
distribution['name'] + distribution['version'],
|
||||
attr.get(
|
||||
distribution['name'],
|
||||
attr.get(
|
||||
distribution['family'],
|
||||
getattr(self, default_value))))
|
||||
return value
|
||||
|
||||
def get_shutdown_command_args(self, distribution):
|
||||
args = self._get_value_from_facts('SHUTDOWN_COMMAND_ARGS', distribution, 'DEFAULT_SHUTDOWN_COMMAND_ARGS')
|
||||
# Convert seconds to minutes. If less that 60, set it to 0.
|
||||
delay_sec = self.delay
|
||||
shutdown_message = self._task.args.get('msg', self.DEFAULT_SHUTDOWN_MESSAGE)
|
||||
return args.format(delay_sec=delay_sec, delay_min=delay_sec // 60, message=shutdown_message)
|
||||
|
||||
def get_distribution(self, task_vars):
|
||||
# FIXME: only execute the module if we don't already have the facts we need
|
||||
distribution = {}
|
||||
display.debug('{action}: running setup module to get distribution'.format(action=self._task.action))
|
||||
module_output = self._execute_module(
|
||||
task_vars=task_vars,
|
||||
module_name='ansible.legacy.setup',
|
||||
module_args={'gather_subset': 'min'})
|
||||
try:
|
||||
if module_output.get('failed', False):
|
||||
raise AnsibleError('Failed to determine system distribution. {0}, {1}'.format(
|
||||
to_native(module_output['module_stdout']).strip(),
|
||||
to_native(module_output['module_stderr']).strip()))
|
||||
distribution['name'] = module_output['ansible_facts']['ansible_distribution'].lower()
|
||||
distribution['version'] = to_text(module_output['ansible_facts']['ansible_distribution_version'].split('.')[0])
|
||||
distribution['family'] = to_text(module_output['ansible_facts']['ansible_os_family'].lower())
|
||||
display.debug("{action}: distribution: {dist}".format(action=self._task.action, dist=distribution))
|
||||
return distribution
|
||||
except KeyError as ke:
|
||||
raise AnsibleError('Failed to get distribution information. Missing "{0}" in output.'.format(ke.args[0]))
|
||||
|
||||
def get_shutdown_command(self, task_vars, distribution):
|
||||
shutdown_bin = self._get_value_from_facts('SHUTDOWN_COMMANDS', distribution, 'DEFAULT_SHUTDOWN_COMMAND')
|
||||
default_search_paths = ['/sbin', '/usr/sbin', '/usr/local/sbin']
|
||||
search_paths = self._task.args.get('search_paths', default_search_paths)
|
||||
|
||||
# FIXME: switch all this to user arg spec validation methods when they are available
|
||||
# Convert bare strings to a list
|
||||
if is_string(search_paths):
|
||||
search_paths = [search_paths]
|
||||
|
||||
# Error if we didn't get a list
|
||||
err_msg = "'search_paths' must be a string or flat list of strings, got {0}"
|
||||
try:
|
||||
incorrect_type = any(not is_string(x) for x in search_paths)
|
||||
if not isinstance(search_paths, list) or incorrect_type:
|
||||
raise TypeError
|
||||
except TypeError:
|
||||
raise AnsibleError(err_msg.format(search_paths))
|
||||
|
||||
display.debug('{action}: running find module looking in {paths} to get path for "{command}"'.format(
|
||||
action=self._task.action,
|
||||
command=shutdown_bin,
|
||||
paths=search_paths))
|
||||
find_result = self._execute_module(
|
||||
task_vars=task_vars,
|
||||
# prevent collection search by calling with ansible.legacy (still allows library/ override of find)
|
||||
module_name='ansible.legacy.find',
|
||||
module_args={
|
||||
'paths': search_paths,
|
||||
'patterns': [shutdown_bin],
|
||||
'file_type': 'any'
|
||||
}
|
||||
)
|
||||
|
||||
full_path = [x['path'] for x in find_result['files']]
|
||||
if not full_path:
|
||||
raise AnsibleError('Unable to find command "{0}" in search paths: {1}'.format(shutdown_bin, search_paths))
|
||||
self._shutdown_command = full_path[0]
|
||||
return self._shutdown_command
|
||||
|
||||
def perform_shutdown(self, task_vars, distribution):
|
||||
result = {}
|
||||
shutdown_result = {}
|
||||
shutdown_command = self.get_shutdown_command(task_vars, distribution)
|
||||
shutdown_command_args = self.get_shutdown_command_args(distribution)
|
||||
shutdown_command_exec = '{0} {1}'.format(shutdown_command, shutdown_command_args)
|
||||
|
||||
self.cleanup(force=True)
|
||||
try:
|
||||
display.vvv("{action}: shutting down server...".format(action=self._task.action))
|
||||
display.debug("{action}: shutting down server with command '{command}'".format(action=self._task.action, command=shutdown_command_exec))
|
||||
if self._play_context.check_mode:
|
||||
shutdown_result['rc'] = 0
|
||||
else:
|
||||
shutdown_result = self._low_level_execute_command(shutdown_command_exec, sudoable=self.DEFAULT_SUDOABLE)
|
||||
except AnsibleConnectionFailure as e:
|
||||
# If the connection is closed too quickly due to the system being shutdown, carry on
|
||||
display.debug('{action}: AnsibleConnectionFailure caught and handled: {error}'.format(action=self._task.action, error=to_text(e)))
|
||||
shutdown_result['rc'] = 0
|
||||
|
||||
if shutdown_result['rc'] != 0:
|
||||
result['failed'] = True
|
||||
result['shutdown'] = False
|
||||
result['msg'] = "Shutdown command failed. Error was {stdout}, {stderr}".format(
|
||||
stdout=to_native(shutdown_result['stdout'].strip()),
|
||||
stderr=to_native(shutdown_result['stderr'].strip()))
|
||||
return result
|
||||
|
||||
result['failed'] = False
|
||||
result['shutdown_command'] = shutdown_command_exec
|
||||
return result
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
self._supports_check_mode = True
|
||||
self._supports_async = True
|
||||
|
||||
# If running with local connection, fail so we don't shutdown ourself
|
||||
if self._connection.transport == 'local' and (not self._play_context.check_mode):
|
||||
msg = 'Running {0} with local connection would shutdown the control node.'.format(self._task.action)
|
||||
return {'changed': False, 'elapsed': 0, 'shutdown': False, 'failed': True, 'msg': msg}
|
||||
|
||||
if task_vars is None:
|
||||
task_vars = {}
|
||||
|
||||
result = super(ActionModule, self).run(tmp, task_vars)
|
||||
|
||||
if result.get('skipped', False) or result.get('failed', False):
|
||||
return result
|
||||
|
||||
distribution = self.get_distribution(task_vars)
|
||||
|
||||
# Initiate shutdown
|
||||
shutdown_result = self.perform_shutdown(task_vars, distribution)
|
||||
|
||||
if shutdown_result['failed']:
|
||||
result = shutdown_result
|
||||
return result
|
||||
|
||||
result['shutdown'] = True
|
||||
result['changed'] = True
|
||||
result['shutdown_command'] = shutdown_result['shutdown_command']
|
||||
|
||||
return result
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
||||
def run(self, tmp=None, task_vars=None):
|
||||
del tmp # tmp no longer has any effect
|
||||
|
||||
module_name = self._task.action.split('.')[-1]
|
||||
self._config_module = True if module_name == 'voss_config' else False
|
||||
persistent_connection = self._play_context.connection.split('.')[-1]
|
||||
|
||||
if persistent_connection not in ('network_cli'):
|
||||
return {'failed': True, 'msg': 'Connection type %s is not valid for this module' % self._play_context.connection}
|
||||
return super(ActionModule, self).run(task_vars=task_vars)
|
||||
@@ -40,7 +40,7 @@ DOCUMENTATION = '''
|
||||
- name: ANSIBLE_DOAS_EXE
|
||||
become_flags:
|
||||
description: Options to pass to doas
|
||||
default:
|
||||
default: ''
|
||||
ini:
|
||||
- section: privilege_escalation
|
||||
key: become_flags
|
||||
@@ -111,15 +111,14 @@ class BecomeModule(BecomeBase):
|
||||
|
||||
self.prompt = True
|
||||
|
||||
become_exe = self.get_option('become_exe') or self.name
|
||||
become_exe = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags') or ''
|
||||
flags = self.get_option('become_flags')
|
||||
if not self.get_option('become_pass') and '-n' not in flags:
|
||||
flags += ' -n'
|
||||
|
||||
user = self.get_option('become_user') or ''
|
||||
if user:
|
||||
user = '-u %s' % (user)
|
||||
become_user = self.get_option('become_user')
|
||||
user = '-u %s' % (become_user) if become_user else ''
|
||||
|
||||
success_cmd = self._build_success_command(cmd, shell, noexe=True)
|
||||
executable = getattr(shell, 'executable', shell.SHELL_FAMILY)
|
||||
|
||||
@@ -82,15 +82,14 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
becomecmd = self.get_option('become_exe') or self.name
|
||||
becomecmd = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags') or ''
|
||||
flags = self.get_option('become_flags')
|
||||
if self.get_option('become_pass'):
|
||||
self.prompt = '[dzdo via ansible, key=%s] password:' % self._id
|
||||
flags = '%s -p "%s"' % (flags.replace('-n', ''), self.prompt)
|
||||
|
||||
user = self.get_option('become_user') or ''
|
||||
if user:
|
||||
user = '-u %s' % (user)
|
||||
become_user = self.get_option('become_user')
|
||||
user = '-u %s' % (become_user) if become_user else ''
|
||||
|
||||
return ' '.join([becomecmd, flags, user, self._build_success_command(cmd, shell)])
|
||||
|
||||
@@ -113,7 +113,8 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
exe = self.get_option('become_exe') or self.name
|
||||
flags = self.get_option('become_flags') or ''
|
||||
user = self.get_option('become_user') or ''
|
||||
exe = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
user = self.get_option('become_user')
|
||||
return '%s %s %s -e %s ' % (exe, user, flags, self._build_success_command(cmd, shell))
|
||||
|
||||
@@ -13,6 +13,7 @@ DOCUMENTATION = '''
|
||||
options:
|
||||
become_user:
|
||||
description: User you 'become' to execute the task
|
||||
default: ''
|
||||
ini:
|
||||
- section: privilege_escalation
|
||||
key: become_user
|
||||
@@ -80,7 +81,8 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
become = self.get_option('become_exe') or self.name
|
||||
flags = self.get_option('become_flags') or ''
|
||||
user = self.get_option('become_user') or ''
|
||||
become = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
user = self.get_option('become_user')
|
||||
return '%s -q shell %s %s@ %s' % (become, flags, user, cmd)
|
||||
|
||||
@@ -41,6 +41,7 @@ DOCUMENTATION = '''
|
||||
- name: ANSIBLE_PBRUN_EXE
|
||||
become_flags:
|
||||
description: Options to pass to pbrun
|
||||
default: ''
|
||||
ini:
|
||||
- section: privilege_escalation
|
||||
key: become_flags
|
||||
@@ -93,11 +94,11 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
become_exe = self.get_option('become_exe') or self.name
|
||||
flags = self.get_option('become_flags') or ''
|
||||
user = self.get_option('become_user') or ''
|
||||
if user:
|
||||
user = '-u %s' % (user)
|
||||
become_exe = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
become_user = self.get_option('become_user')
|
||||
user = '-u %s' % (become_user) if become_user else ''
|
||||
noexe = not self.get_option('wrap_exe')
|
||||
|
||||
return ' '.join([become_exe, flags, user, self._build_success_command(cmd, shell, noexe=noexe)])
|
||||
|
||||
@@ -97,7 +97,8 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
exe = self.get_option('become_exe') or self.name
|
||||
exe = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
noexe = not self.get_option('wrap_exe')
|
||||
return '%s %s "%s"' % (exe, flags, self._build_success_command(cmd, shell, noexe=noexe))
|
||||
|
||||
@@ -27,6 +27,7 @@ DOCUMENTATION = '''
|
||||
- name: ANSIBLE_PMRUN_EXE
|
||||
become_flags:
|
||||
description: Options to pass to pmrun
|
||||
default: ''
|
||||
ini:
|
||||
- section: privilege_escalation
|
||||
key: become_flags
|
||||
@@ -70,6 +71,7 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
become = self.get_option('become_exe') or self.name
|
||||
flags = self.get_option('become_flags') or ''
|
||||
become = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
return '%s %s %s' % (become, flags, shlex_quote(self._build_success_command(cmd, shell)))
|
||||
|
||||
@@ -13,6 +13,7 @@ DOCUMENTATION = '''
|
||||
options:
|
||||
become_user:
|
||||
description: User you 'become' to execute the task
|
||||
default: ''
|
||||
ini:
|
||||
- section: privilege_escalation
|
||||
key: become_user
|
||||
@@ -74,7 +75,7 @@ class BecomeModule(BecomeBase):
|
||||
|
||||
name = 'community.general.sesu'
|
||||
|
||||
_prompt = 'Please enter your password:'
|
||||
prompt = 'Please enter your password:'
|
||||
fail = missing = ('Sorry, try again with sesu.',)
|
||||
|
||||
def build_become_command(self, cmd, shell):
|
||||
@@ -83,7 +84,8 @@ class BecomeModule(BecomeBase):
|
||||
if not cmd:
|
||||
return cmd
|
||||
|
||||
become = self.get_option('become_exe') or self.name
|
||||
flags = self.get_option('become_flags') or ''
|
||||
user = self.get_option('become_user') or ''
|
||||
become = self.get_option('become_exe')
|
||||
|
||||
flags = self.get_option('become_flags')
|
||||
user = self.get_option('become_user')
|
||||
return '%s %s %s -c %s' % (become, flags, user, self._build_success_command(cmd, shell))
|
||||
|
||||
62
plugins/cache/jsonfile.py
vendored
62
plugins/cache/jsonfile.py
vendored
@@ -1,62 +0,0 @@
|
||||
# (c) 2014, Brian Coca, Josh Drake, et al
|
||||
# (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
cache: jsonfile
|
||||
short_description: JSON formatted files.
|
||||
description:
|
||||
- This cache uses JSON formatted, per host, files saved to the filesystem.
|
||||
author: Ansible Core (@ansible-core)
|
||||
options:
|
||||
_uri:
|
||||
required: True
|
||||
description:
|
||||
- Path in which the cache plugin will save the JSON files
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
|
||||
ini:
|
||||
- key: fact_caching_connection
|
||||
section: defaults
|
||||
_prefix:
|
||||
description: User defined prefix to use when creating the JSON files
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_PREFIX
|
||||
ini:
|
||||
- key: fact_caching_prefix
|
||||
section: defaults
|
||||
_timeout:
|
||||
default: 86400
|
||||
description: Expiration timeout in seconds for the cache plugin data. Set to 0 to never expire
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_TIMEOUT
|
||||
ini:
|
||||
- key: fact_caching_timeout
|
||||
section: defaults
|
||||
type: integer
|
||||
'''
|
||||
|
||||
import codecs
|
||||
import json
|
||||
|
||||
from ansible.parsing.ajson import AnsibleJSONEncoder, AnsibleJSONDecoder
|
||||
from ansible.plugins.cache import BaseFileCacheModule
|
||||
|
||||
|
||||
class CacheModule(BaseFileCacheModule):
|
||||
"""
|
||||
A caching module backed by json files.
|
||||
"""
|
||||
|
||||
def _load(self, filepath):
|
||||
# Valid JSON is always UTF-8 encoded.
|
||||
with codecs.open(filepath, 'r', encoding='utf-8') as f:
|
||||
return json.load(f, cls=AnsibleJSONDecoder)
|
||||
|
||||
def _dump(self, value, filepath):
|
||||
with codecs.open(filepath, 'w', encoding='utf-8') as f:
|
||||
f.write(json.dumps(value, cls=AnsibleJSONEncoder, sort_keys=True, indent=4))
|
||||
3
plugins/cache/memcached.py
vendored
3
plugins/cache/memcached.py
vendored
@@ -179,7 +179,8 @@ class CacheModule(BaseCacheModule):
|
||||
self._prefix = self.get_option('_prefix')
|
||||
except KeyError:
|
||||
display.deprecated('Rather than importing CacheModules directly, '
|
||||
'use ansible.plugins.loader.cache_loader', version='2.12')
|
||||
'use ansible.plugins.loader.cache_loader',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
if C.CACHE_PLUGIN_CONNECTION:
|
||||
connection = C.CACHE_PLUGIN_CONNECTION.split(',')
|
||||
self._timeout = C.CACHE_PLUGIN_TIMEOUT
|
||||
|
||||
20
plugins/cache/redis.py
vendored
20
plugins/cache/redis.py
vendored
@@ -15,6 +15,8 @@ DOCUMENTATION = '''
|
||||
_uri:
|
||||
description:
|
||||
- A colon separated string of connection information for Redis.
|
||||
- The format is C(host:port:db:password), for example C(localhost:6379:0:changeme).
|
||||
- To use encryption in transit, prefix the connection with C(tls://), as in C(tls://localhost:6379:0:changeme).
|
||||
required: True
|
||||
env:
|
||||
- name: ANSIBLE_CACHE_PLUGIN_CONNECTION
|
||||
@@ -67,24 +69,32 @@ class CacheModule(BaseCacheModule):
|
||||
performance.
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
connection = []
|
||||
uri = ''
|
||||
|
||||
try:
|
||||
super(CacheModule, self).__init__(*args, **kwargs)
|
||||
if self.get_option('_uri'):
|
||||
connection = self.get_option('_uri').split(':')
|
||||
uri = self.get_option('_uri')
|
||||
self._timeout = float(self.get_option('_timeout'))
|
||||
self._prefix = self.get_option('_prefix')
|
||||
except KeyError:
|
||||
display.deprecated('Rather than importing CacheModules directly, '
|
||||
'use ansible.plugins.loader.cache_loader', version='2.12')
|
||||
'use ansible.plugins.loader.cache_loader',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
if C.CACHE_PLUGIN_CONNECTION:
|
||||
connection = C.CACHE_PLUGIN_CONNECTION.split(':')
|
||||
uri = C.CACHE_PLUGIN_CONNECTION
|
||||
self._timeout = float(C.CACHE_PLUGIN_TIMEOUT)
|
||||
self._prefix = C.CACHE_PLUGIN_PREFIX
|
||||
|
||||
self._cache = {}
|
||||
self._db = StrictRedis(*connection)
|
||||
kw = {}
|
||||
tlsprefix = 'tls://'
|
||||
if uri.startswith(tlsprefix):
|
||||
kw['ssl'] = True
|
||||
uri = uri[len(tlsprefix):]
|
||||
|
||||
connection = uri.split(':')
|
||||
self._db = StrictRedis(*connection, **kw)
|
||||
self._keys_set = 'ansible_cache_keys'
|
||||
|
||||
def _make_key(self, key):
|
||||
|
||||
@@ -15,7 +15,7 @@ DOCUMENTATION = '''
|
||||
- This callback suppresses any non Failed or Changed status.
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_in: '2.0.0' # was Ansible 2.11
|
||||
alternative: "'default' callback plugin with 'display_skipped_hosts = no' and 'display_ok_hosts = no' options"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
@@ -32,7 +32,7 @@ DOCUMENTATION = '''
|
||||
- name: DISPLAY_SKIPPED_HOSTS
|
||||
deprecated:
|
||||
why: environment variables without "ANSIBLE_" prefix are deprecated
|
||||
version: "2.12"
|
||||
version: "2.0.0" # was Ansible 2.12
|
||||
alternatives: the "ANSIBLE_DISPLAY_SKIPPED_HOSTS" environment variable
|
||||
- name: ANSIBLE_DISPLAY_SKIPPED_HOSTS
|
||||
ini:
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||
'status': ['preview'],
|
||||
'supported_by': 'community'}
|
||||
|
||||
DOCUMENTATION = '''
|
||||
callback: cgroup_memory_recap
|
||||
callback_type: aggregate
|
||||
|
||||
@@ -144,7 +144,7 @@ colors = dict(
|
||||
states = ('skipped', 'ok', 'changed', 'failed', 'unreachable')
|
||||
|
||||
|
||||
class CallbackModule_dense(CallbackModule_default):
|
||||
class CallbackModule(CallbackModule_default):
|
||||
|
||||
'''
|
||||
This is the dense callback interface, where screen estate is still valued.
|
||||
@@ -497,5 +497,3 @@ class CallbackModule_dense(CallbackModule_default):
|
||||
# When using -vv or higher, simply do the default action
|
||||
if display.verbosity >= 2 or not HAS_OD:
|
||||
CallbackModule = CallbackModule_default
|
||||
else:
|
||||
CallbackModule = CallbackModule_dense
|
||||
|
||||
1420
plugins/callback/diy.py
Normal file
1420
plugins/callback/diy.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
- Use this plugin when you do not care about any output for tasks that were completely skipped
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_in: '2.0.0' # was Ansible 2.11
|
||||
alternative: "'default' callback plugin with 'display_skipped_hosts = no' option"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
|
||||
@@ -53,7 +53,7 @@ class CallbackModule(CallbackBase):
|
||||
CALLBACK_NEEDS_WHITELIST = True
|
||||
|
||||
TIME_FORMAT = "%b %d %Y %H:%M:%S"
|
||||
MSG_FORMAT = "%(now)s - %(category)s - %(data)s\n\n"
|
||||
MSG_FORMAT = "%(now)s - %(playbook)s - %(task_name)s - %(task_action)s - %(category)s - %(data)s\n\n"
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -67,7 +67,8 @@ class CallbackModule(CallbackBase):
|
||||
if not os.path.exists(self.log_folder):
|
||||
makedirs_safe(self.log_folder)
|
||||
|
||||
def log(self, host, category, data):
|
||||
def log(self, result, category):
|
||||
data = result._result
|
||||
if isinstance(data, MutableMapping):
|
||||
if '_ansible_verbose_override' in data:
|
||||
# avoid logging extraneous data
|
||||
@@ -79,30 +80,43 @@ class CallbackModule(CallbackBase):
|
||||
if invocation is not None:
|
||||
data = json.dumps(invocation) + " => %s " % data
|
||||
|
||||
path = os.path.join(self.log_folder, host)
|
||||
path = os.path.join(self.log_folder, result._host.get_name())
|
||||
now = time.strftime(self.TIME_FORMAT, time.localtime())
|
||||
|
||||
msg = to_bytes(self.MSG_FORMAT % dict(now=now, category=category, data=data))
|
||||
msg = to_bytes(
|
||||
self.MSG_FORMAT
|
||||
% dict(
|
||||
now=now,
|
||||
playbook=self.playbook,
|
||||
task_name=result._task.name,
|
||||
task_action=result._task.action,
|
||||
category=category,
|
||||
data=data,
|
||||
)
|
||||
)
|
||||
with open(path, "ab") as fd:
|
||||
fd.write(msg)
|
||||
|
||||
def runner_on_failed(self, host, res, ignore_errors=False):
|
||||
self.log(host, 'FAILED', res)
|
||||
def v2_runner_on_failed(self, result, ignore_errors=False):
|
||||
self.log(result, 'FAILED')
|
||||
|
||||
def runner_on_ok(self, host, res):
|
||||
self.log(host, 'OK', res)
|
||||
def v2_runner_on_ok(self, result):
|
||||
self.log(result, 'OK')
|
||||
|
||||
def runner_on_skipped(self, host, item=None):
|
||||
self.log(host, 'SKIPPED', '...')
|
||||
def v2_runner_on_skipped(self, result):
|
||||
self.log(result, 'SKIPPED')
|
||||
|
||||
def runner_on_unreachable(self, host, res):
|
||||
self.log(host, 'UNREACHABLE', res)
|
||||
def v2_runner_on_unreachable(self, result):
|
||||
self.log(result, 'UNREACHABLE')
|
||||
|
||||
def runner_on_async_failed(self, host, res, jid):
|
||||
self.log(host, 'ASYNC_FAILED', res)
|
||||
def v2_runner_on_async_failed(self, result):
|
||||
self.log(result, 'ASYNC_FAILED')
|
||||
|
||||
def playbook_on_import_for_host(self, host, imported_file):
|
||||
self.log(host, 'IMPORTED', imported_file)
|
||||
def v2_playbook_on_start(self, playbook):
|
||||
self.playbook = playbook._file_name
|
||||
|
||||
def playbook_on_not_import_for_host(self, host, missing_file):
|
||||
self.log(host, 'NOTIMPORTED', missing_file)
|
||||
def v2_playbook_on_import_for_host(self, result, imported_file):
|
||||
self.log(result, 'IMPORTED', imported_file)
|
||||
|
||||
def v2_playbook_on_not_import_for_host(self, result, missing_file):
|
||||
self.log(result, 'NOTIMPORTED', missing_file)
|
||||
|
||||
@@ -75,7 +75,7 @@ examples: >
|
||||
To enable, add this to your ansible.cfg file in the defaults block
|
||||
|
||||
[defaults]
|
||||
callback_whitelist = logentries
|
||||
callback_whitelist = community.general.logentries
|
||||
|
||||
Either set the environment variables
|
||||
export LOGENTRIES_API=data.logentries.com
|
||||
|
||||
@@ -19,16 +19,28 @@ DOCUMENTATION = '''
|
||||
description: Address of the Logstash server
|
||||
env:
|
||||
- name: LOGSTASH_SERVER
|
||||
ini:
|
||||
- section: callback_logstash
|
||||
key: server
|
||||
version_added: 1.0.0
|
||||
default: localhost
|
||||
port:
|
||||
description: Port on which logstash is listening
|
||||
env:
|
||||
- name: LOGSTASH_PORT
|
||||
ini:
|
||||
- section: callback_logstash
|
||||
key: port
|
||||
version_added: 1.0.0
|
||||
default: 5000
|
||||
type:
|
||||
description: Message type
|
||||
env:
|
||||
- name: LOGSTASH_TYPE
|
||||
ini:
|
||||
- section: callback_logstash
|
||||
key: type
|
||||
version_added: 1.0.0
|
||||
default: ansible
|
||||
'''
|
||||
|
||||
@@ -68,7 +80,7 @@ class CallbackModule(CallbackBase):
|
||||
Requires:
|
||||
python-logstash
|
||||
|
||||
This plugin makes use of the following environment variables:
|
||||
This plugin makes use of the following environment variables or ini config:
|
||||
LOGSTASH_SERVER (optional): defaults to localhost
|
||||
LOGSTASH_PORT (optional): defaults to 5000
|
||||
LOGSTASH_TYPE (optional): defaults to ansible
|
||||
@@ -79,30 +91,37 @@ class CallbackModule(CallbackBase):
|
||||
CALLBACK_NAME = 'community.general.logstash'
|
||||
CALLBACK_NEEDS_WHITELIST = True
|
||||
|
||||
def __init__(self):
|
||||
super(CallbackModule, self).__init__()
|
||||
def __init__(self, display=None):
|
||||
super(CallbackModule, self).__init__(display=display)
|
||||
|
||||
if not HAS_LOGSTASH:
|
||||
self.disabled = True
|
||||
self._display.warning("The required python-logstash is not installed. "
|
||||
"pip install python-logstash")
|
||||
else:
|
||||
self.logger = logging.getLogger('python-logstash-logger')
|
||||
self.logger.setLevel(logging.DEBUG)
|
||||
|
||||
self.handler = logstash.TCPLogstashHandler(
|
||||
os.getenv('LOGSTASH_SERVER', 'localhost'),
|
||||
int(os.getenv('LOGSTASH_PORT', 5000)),
|
||||
version=1,
|
||||
message_type=os.getenv('LOGSTASH_TYPE', 'ansible')
|
||||
)
|
||||
|
||||
self.logger.addHandler(self.handler)
|
||||
self.hostname = socket.gethostname()
|
||||
self.session = str(uuid.uuid1())
|
||||
self.errors = 0
|
||||
self.start_time = datetime.utcnow()
|
||||
|
||||
def set_options(self, task_keys=None, var_options=None, direct=None):
|
||||
|
||||
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
|
||||
|
||||
self.logger = logging.getLogger('python-logstash-logger')
|
||||
self.logger.setLevel(logging.DEBUG)
|
||||
|
||||
self.logstash_server = self.get_option('server')
|
||||
self.logstash_port = self.get_option('port')
|
||||
self.logstash_type = self.get_option('type')
|
||||
self.handler = logstash.TCPLogstashHandler(
|
||||
self.logstash_server,
|
||||
int(self.logstash_port),
|
||||
version=1,
|
||||
message_type=self.logstash_type
|
||||
)
|
||||
self.logger.addHandler(self.handler)
|
||||
self.hostname = socket.gethostname()
|
||||
self.session = str(uuid.uuid1())
|
||||
self.errors = 0
|
||||
|
||||
def v2_playbook_on_start(self, playbook):
|
||||
self.playbook = playbook._file_name
|
||||
data = {
|
||||
|
||||
@@ -16,7 +16,7 @@ DOCUMENTATION = '''
|
||||
description:
|
||||
- This plugin will use the 'say' or 'espeak' program to "speak" about play events.
|
||||
notes:
|
||||
- In 2.8, this callback has been renamed from C(osx_say) into M(say).
|
||||
- In 2.8, this callback has been renamed from C(osx_say) into M(community.general.say).
|
||||
'''
|
||||
|
||||
import distutils.spawn
|
||||
|
||||
@@ -30,8 +30,8 @@ DOCUMENTATION = '''
|
||||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
- debug: msg="This will not be printed"
|
||||
- debug: msg="But this will"
|
||||
- ansible.builtin.debug: msg="This will not be printed"
|
||||
- ansible.builtin.debug: msg="But this will"
|
||||
tags: [print_action]
|
||||
"""
|
||||
|
||||
@@ -201,7 +201,7 @@ class CallbackModule(CallbackBase):
|
||||
)
|
||||
if 'results' in result._result:
|
||||
for r in result._result['results']:
|
||||
failed = 'failed' in r
|
||||
failed = 'failed' in r and r['failed']
|
||||
|
||||
stderr = [r.get('exception', None), r.get('module_stderr', None)]
|
||||
stderr = "\n".join([e for e in stderr if e]).strip()
|
||||
|
||||
@@ -45,13 +45,25 @@ DOCUMENTATION = '''
|
||||
ini:
|
||||
- section: callback_splunk
|
||||
key: authtoken
|
||||
validate_certs:
|
||||
description: Whether to validate certificates for connections to HEC. It is not recommended to set to
|
||||
C(false) except when you are sure that nobody can intercept the connection
|
||||
between this plugin and HEC, as setting it to C(false) allows man-in-the-middle attacks!
|
||||
env:
|
||||
- name: SPLUNK_VALIDATE_CERTS
|
||||
ini:
|
||||
- section: callback_splunk
|
||||
key: validate_certs
|
||||
type: bool
|
||||
default: true
|
||||
version_added: '1.0.0'
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
examples: >
|
||||
To enable, add this to your ansible.cfg file in the defaults block
|
||||
[defaults]
|
||||
callback_whitelist = splunk
|
||||
callback_whitelist = community.general.splunk
|
||||
Set the environment variable
|
||||
export SPLUNK_URL=http://mysplunkinstance.datapaas.io:8088/services/collector/event
|
||||
export SPLUNK_AUTHTOKEN=f23blad6-5965-4537-bf69-5b5a545blabla88
|
||||
@@ -84,7 +96,7 @@ class SplunkHTTPCollectorSource(object):
|
||||
self.ip_address = socket.gethostbyname(socket.gethostname())
|
||||
self.user = getpass.getuser()
|
||||
|
||||
def send_event(self, url, authtoken, state, result, runtime):
|
||||
def send_event(self, url, authtoken, validate_certs, state, result, runtime):
|
||||
if result._task_fields['args'].get('_ansible_check_mode') is True:
|
||||
self.ansible_check_mode = True
|
||||
|
||||
@@ -129,7 +141,8 @@ class SplunkHTTPCollectorSource(object):
|
||||
'Content-type': 'application/json',
|
||||
'Authorization': 'Splunk ' + authtoken
|
||||
},
|
||||
method='POST'
|
||||
method='POST',
|
||||
validate_certs=validate_certs
|
||||
)
|
||||
|
||||
|
||||
@@ -144,6 +157,7 @@ class CallbackModule(CallbackBase):
|
||||
self.start_datetimes = {} # Collect task start times
|
||||
self.url = None
|
||||
self.authtoken = None
|
||||
self.validate_certs = None
|
||||
self.splunk = SplunkHTTPCollectorSource()
|
||||
|
||||
def _runtime(self, result):
|
||||
@@ -153,7 +167,9 @@ class CallbackModule(CallbackBase):
|
||||
).total_seconds()
|
||||
|
||||
def set_options(self, task_keys=None, var_options=None, direct=None):
|
||||
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
|
||||
super(CallbackModule, self).set_options(task_keys=task_keys,
|
||||
var_options=var_options,
|
||||
direct=direct)
|
||||
|
||||
self.url = self.get_option('url')
|
||||
|
||||
@@ -175,6 +191,8 @@ class CallbackModule(CallbackBase):
|
||||
'`SPLUNK_AUTHTOKEN` environment variable or '
|
||||
'in the ansible.cfg file.')
|
||||
|
||||
self.validate_certs = self.get_option('validate_certs')
|
||||
|
||||
def v2_playbook_on_start(self, playbook):
|
||||
self.splunk.ansible_playbook = basename(playbook._file_name)
|
||||
|
||||
@@ -188,6 +206,7 @@ class CallbackModule(CallbackBase):
|
||||
self.splunk.send_event(
|
||||
self.url,
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
'OK',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -197,6 +216,7 @@ class CallbackModule(CallbackBase):
|
||||
self.splunk.send_event(
|
||||
self.url,
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
'SKIPPED',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -206,6 +226,7 @@ class CallbackModule(CallbackBase):
|
||||
self.splunk.send_event(
|
||||
self.url,
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
'FAILED',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -215,6 +236,7 @@ class CallbackModule(CallbackBase):
|
||||
self.splunk.send_event(
|
||||
self.url,
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
'FAILED',
|
||||
result,
|
||||
self._runtime(result)
|
||||
@@ -224,6 +246,7 @@ class CallbackModule(CallbackBase):
|
||||
self.splunk.send_event(
|
||||
self.url,
|
||||
self.authtoken,
|
||||
self.validate_certs,
|
||||
'UNREACHABLE',
|
||||
result,
|
||||
self._runtime(result)
|
||||
|
||||
@@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
||||
short_description: Splits output, sending failed tasks to stderr
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_in: '2.0.0' # was Ansible 2.11
|
||||
alternative: "'default' callback plugin with 'display_failed_stderr = yes' option"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
|
||||
@@ -42,7 +42,7 @@ EXAMPLES = '''
|
||||
examples: >
|
||||
To enable, add this to your ansible.cfg file in the defaults block
|
||||
[defaults]
|
||||
callback_whitelist = sumologic
|
||||
callback_whitelist = community.general.sumologic
|
||||
|
||||
Set the environment variable
|
||||
export SUMOLOGIC_URL=https://endpoint1.collection.us2.sumologic.com/receiver/v1/http/R8moSv1d8EW9LAUFZJ6dbxCFxwLH6kfCdcBfddlfxCbLuL-BN5twcTpMk__pYy_cDmp==
|
||||
|
||||
@@ -66,7 +66,9 @@ class CallbackModule(CallbackBase):
|
||||
|
||||
super(CallbackModule, self).__init__()
|
||||
|
||||
self.set_options()
|
||||
def set_options(self, task_keys=None, var_options=None, direct=None):
|
||||
|
||||
super(CallbackModule, self).set_options(task_keys=task_keys, var_options=var_options, direct=direct)
|
||||
|
||||
syslog_host = self.get_option("server")
|
||||
syslog_port = int(self.get_option("port"))
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: aireos
|
||||
short_description: Use aireos cliconf to run command on Cisco WLC platform
|
||||
description:
|
||||
- This aireos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Cisco WLC network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'aireos'
|
||||
reply = self.get('show sysinfo')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Product Version\.* (.*)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'System Name\.* (.*)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
reply = self.get('show inventory')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'DESCR: \"(.*)\"', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
if source == 'running':
|
||||
cmd = 'show run-config commands'
|
||||
else:
|
||||
cmd = 'show run-config startup-commands'
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['config'], to_list(command), ['end']):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
|
||||
def set_cli_prompt_context(self):
|
||||
"""
|
||||
Make sure we are in the operational cli mode
|
||||
:return: None
|
||||
"""
|
||||
if self._connection.connected:
|
||||
self._update_cli_prompt_context(config_context=')#')
|
||||
@@ -1,72 +0,0 @@
|
||||
# (C) 2018 Red Hat Inc.
|
||||
# Copyright (C) 2019 APCON.
|
||||
#
|
||||
# GNU General Public License v3.0+
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
#
|
||||
# Contains CLIConf Plugin methods for apconos Modules
|
||||
# APCON Networking
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
author: "David Li (@davidlee-ap)"
|
||||
cliconf: apconos
|
||||
short_description: Use apconos cliconf to run command on APCON network devices
|
||||
description:
|
||||
- This apconos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from APCON network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'apconos'
|
||||
reply = self.get(b'show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
if data:
|
||||
device_info['network_os_version'] = self.parse_version(data)
|
||||
device_info['network_os_model'] = self.parse_model(data)
|
||||
|
||||
return device_info
|
||||
|
||||
def parse_version(self, data):
|
||||
return ""
|
||||
|
||||
def parse_model(self, data):
|
||||
return ""
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text'):
|
||||
pass
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
for cmd in chain([b'configure terminal'], to_list(command), [b'end']):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
return json.dumps(self.get_device_info())
|
||||
@@ -1,95 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: aruba
|
||||
short_description: Use aruba cliconf to run command on Aruba platform
|
||||
description:
|
||||
- This aruba plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Aruba network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'aruba'
|
||||
reply = self.get('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Version (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'^MODEL: (\S+)\),', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
reply = self.get('show hostname')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'^Hostname is (.+)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
if source == 'running':
|
||||
cmd = 'show running-config all'
|
||||
else:
|
||||
cmd = 'show configuration'
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['configure terminal'], to_list(command), ['end']):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
|
||||
def set_cli_prompt_context(self):
|
||||
"""
|
||||
Make sure we are in the operational cli mode
|
||||
:return: None
|
||||
"""
|
||||
if self._connection.connected:
|
||||
self._update_cli_prompt_context(config_context=')#')
|
||||
@@ -1,121 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: ce
|
||||
short_description: Use ce cliconf to run command on HUAWEI CloudEngine platform
|
||||
description:
|
||||
- This ce plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from HUAWEI CloudEngine network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'ce'
|
||||
reply = self.get('display version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'^Huawei.+\n.+\Version\s+(\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1).strip(',')
|
||||
|
||||
match = re.search(r'^Huawei(.+)\n.+\(\S+\s+\S+\)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
match = re.search(r'HUAWEI\s+(\S+)\s+uptime', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running'):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if not flags:
|
||||
flags = []
|
||||
|
||||
cmd = 'display current-configuration'
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
results = []
|
||||
for cmd in chain(['configure terminal'], to_list(command), ['end']):
|
||||
if isinstance(cmd, dict):
|
||||
command = cmd['command']
|
||||
prompt = cmd['prompt']
|
||||
answer = cmd['answer']
|
||||
newline = cmd.get('newline', True)
|
||||
else:
|
||||
command = cmd
|
||||
prompt = None
|
||||
answer = None
|
||||
newline = True
|
||||
|
||||
results.append(self.send_command(command, prompt, answer, False, newline))
|
||||
return results[1:-1]
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
|
||||
def set_cli_prompt_context(self):
|
||||
"""
|
||||
Make sure we are in the operational cli mode
|
||||
:return: None
|
||||
"""
|
||||
if self._connection.connected:
|
||||
out = self._connection.get_prompt()
|
||||
|
||||
if out is None:
|
||||
raise AnsibleConnectionFailure(message=u'cli prompt is not identified from the last received'
|
||||
u' response window: %s' % self._connection._last_recv_window)
|
||||
|
||||
prompt = to_text(out, errors='surrogate_then_replace').strip()
|
||||
while prompt.endswith(']'):
|
||||
self._connection.queue_message('vvvv', 'wrong context, sending return to device')
|
||||
if prompt.startswith('[*'):
|
||||
self._connection.exec_command('clear configuration candidate')
|
||||
self._connection.exec_command('return')
|
||||
out = self._connection.get_prompt()
|
||||
prompt = to_text(out, errors='surrogate_then_replace').strip()
|
||||
@@ -1,135 +0,0 @@
|
||||
# (C) 2017 Red Hat Inc.
|
||||
# Copyright (C) 2017 Lenovo.
|
||||
#
|
||||
# GNU General Public License v3.0+
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
#
|
||||
# Contains CLIConf Plugin methods for CNOS Modules
|
||||
# Lenovo Networking
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: cnos
|
||||
short_description: Use cnos cliconf to run command on Lenovo CNOS platform
|
||||
description:
|
||||
- This cnos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Lenovo CNOS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'cnos'
|
||||
reply = self.get('show sys-info')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
host = self.get('show hostname')
|
||||
hostname = to_text(host, errors='surrogate_or_strict').strip()
|
||||
if data:
|
||||
device_info['network_os_version'] = self.parse_version(data)
|
||||
device_info['network_os_model'] = self.parse_model(data)
|
||||
device_info['network_os_hostname'] = hostname
|
||||
|
||||
return device_info
|
||||
|
||||
def parse_version(self, data):
|
||||
for line in data.split('\n'):
|
||||
line = line.strip()
|
||||
match = re.match(r'System Software Revision (.*?)',
|
||||
line, re.M | re.I)
|
||||
if match:
|
||||
vers = line.split(':')
|
||||
ver = vers[1].strip()
|
||||
return ver
|
||||
return "NA"
|
||||
|
||||
def parse_model(self, data):
|
||||
for line in data.split('\n'):
|
||||
line = line.strip()
|
||||
match = re.match(r'System Model (.*?)', line, re.M | re.I)
|
||||
if match:
|
||||
mdls = line.split(':')
|
||||
mdl = mdls[1].strip()
|
||||
return mdl
|
||||
return "NA"
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
msg = "fetching configuration from %s is not supported"
|
||||
return self.invalid_params(msg % source)
|
||||
if source == 'running':
|
||||
cmd = 'show running-config'
|
||||
else:
|
||||
cmd = 'show startup-config'
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, candidate=None, commit=True,
|
||||
replace=None, comment=None):
|
||||
resp = {}
|
||||
results = []
|
||||
requests = []
|
||||
if commit:
|
||||
self.send_command('configure terminal')
|
||||
for line in to_list(candidate):
|
||||
if not isinstance(line, Mapping):
|
||||
line = {'command': line}
|
||||
|
||||
cmd = line['command']
|
||||
if cmd != 'end' and cmd[0] != '!':
|
||||
results.append(self.send_command(**line))
|
||||
requests.append(cmd)
|
||||
|
||||
self.send_command('end')
|
||||
else:
|
||||
raise ValueError('check mode is not supported')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
return resp
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
|
||||
def set_cli_prompt_context(self):
|
||||
"""
|
||||
Make sure we are in the operational cli mode
|
||||
:return: None
|
||||
"""
|
||||
if self._connection.connected:
|
||||
out = self._connection.get_prompt()
|
||||
|
||||
if out is None:
|
||||
raise AnsibleConnectionFailure(message=u'cli prompt is not identified from the last received'
|
||||
u' response window: %s' % self._connection._last_recv_window)
|
||||
|
||||
if to_text(out, errors='surrogate_then_replace').strip().endswith(')#'):
|
||||
self._connection.queue_message('vvvv', 'In Config mode, sending exit to device')
|
||||
self._connection.send_command('exit')
|
||||
else:
|
||||
self._connection.send_command('enable')
|
||||
@@ -1,114 +0,0 @@
|
||||
# Copyright: (c) 2018, 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
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: edgeos
|
||||
short_description: Use edgeos cliconf to run command on EdgeOS platform
|
||||
description:
|
||||
- This edgeos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Ubiquiti EdgeOS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'edgeos'
|
||||
reply = self.get('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Version:\s*v?(\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'HW model:\s*(\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
reply = self.get('show host name')
|
||||
device_info['network_os_hostname'] = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
return device_info
|
||||
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
return self.send_command('show configuration commands')
|
||||
|
||||
def edit_config(self, candidate=None, commit=True, replace=False, comment=None):
|
||||
for cmd in chain(['configure'], to_list(candidate)):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def commit(self, comment=None):
|
||||
if comment:
|
||||
command = 'commit comment "{0}"'.format(comment)
|
||||
else:
|
||||
command = 'commit'
|
||||
self.send_command(command)
|
||||
|
||||
def discard_changes(self, *args, **kwargs):
|
||||
self.send_command('discard')
|
||||
|
||||
def run_commands(self, commands=None, check_rc=True):
|
||||
if commands is None:
|
||||
raise ValueError("'commands' value is required")
|
||||
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
if not isinstance(cmd, Mapping):
|
||||
cmd = {'command': cmd}
|
||||
|
||||
output = cmd.pop('output', None)
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for run_commands" % output)
|
||||
|
||||
try:
|
||||
out = self.send_command(**cmd)
|
||||
except AnsibleConnectionFailure as e:
|
||||
if check_rc:
|
||||
raise
|
||||
out = getattr(e, 'err', e)
|
||||
|
||||
responses.append(out)
|
||||
|
||||
return responses
|
||||
|
||||
def get_device_operations(self):
|
||||
return {
|
||||
'supports_diff_replace': False,
|
||||
'supports_commit': True,
|
||||
'supports_rollback': False,
|
||||
'supports_defaults': False,
|
||||
'supports_onbox_diff': False,
|
||||
'supports_commit_comment': True,
|
||||
'supports_multiline_delimiter': False,
|
||||
'supports_diff_match': False,
|
||||
'supports_diff_ignore_lines': False,
|
||||
'supports_generate_diff': False,
|
||||
'supports_replace': False
|
||||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
result['rpc'] += ['commit', 'discard_changes', 'run_commands']
|
||||
result['device_operations'] = self.get_device_operations()
|
||||
return json.dumps(result)
|
||||
@@ -1,141 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: edgeswitch
|
||||
short_description: Use edgeswitch cliconf to run command on EdgeSwitch platform
|
||||
description:
|
||||
- This edgeswitch plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Ubiquiti EdgeSwitch network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import time
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import dumps
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'edgeswitch'
|
||||
reply = self.get(command='show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Software Version\.+ (.*)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1).strip(',')
|
||||
|
||||
match = re.search(r'^Machine Model\.+ (.*)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
match = re.search(r'System Name\.+ (.*)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if source == 'running':
|
||||
cmd = 'show running-config '
|
||||
else:
|
||||
cmd = 'show startup-config '
|
||||
|
||||
if flags:
|
||||
cmd += ' '.join(to_list(flags))
|
||||
cmd = cmd.strip()
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, commands):
|
||||
resp = {}
|
||||
|
||||
results = []
|
||||
requests = []
|
||||
self.send_command('configure')
|
||||
for line in to_list(commands):
|
||||
if not isinstance(line, Mapping):
|
||||
line = {'command': line}
|
||||
|
||||
cmd = line['command']
|
||||
if cmd != 'end' and cmd[0] != '!':
|
||||
results.append(self.send_command(**line))
|
||||
requests.append(cmd)
|
||||
|
||||
self.send_command('end')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
return resp
|
||||
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False):
|
||||
if not command:
|
||||
raise ValueError('must provide value of command to execute')
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for get" % output)
|
||||
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
result['rpc'] += ['run_commands']
|
||||
return json.dumps(result)
|
||||
|
||||
def run_commands(self, commands=None, check_rc=True):
|
||||
if commands is None:
|
||||
raise ValueError("'commands' value is required")
|
||||
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
if not isinstance(cmd, Mapping):
|
||||
cmd = {'command': cmd}
|
||||
|
||||
output = cmd.pop('output', None)
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for run_commands" % output)
|
||||
|
||||
try:
|
||||
out = self.send_command(**cmd)
|
||||
except AnsibleConnectionFailure as e:
|
||||
if check_rc:
|
||||
raise
|
||||
out = getattr(e, 'err', e)
|
||||
|
||||
responses.append(out)
|
||||
|
||||
return responses
|
||||
@@ -1,103 +0,0 @@
|
||||
# (C) 2017 Red Hat Inc.
|
||||
# Copyright (C) 2017 Lenovo.
|
||||
#
|
||||
# GNU General Public License v3.0+
|
||||
#
|
||||
# This program 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.
|
||||
#
|
||||
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
#
|
||||
# Contains CLIConf Plugin methods for ENOS Modules
|
||||
# Lenovo Networking
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: enos
|
||||
short_description: Use enos cliconf to run command on Lenovo ENOS platform
|
||||
description:
|
||||
- This enos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Lenovo ENOS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'enos'
|
||||
reply = self.get('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'^Software Version (.*?) ', data, re.M | re.I)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'^Lenovo RackSwitch (\S+)', data, re.M | re.I)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
match = re.search(r'^(.+) uptime', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
else:
|
||||
device_info['network_os_hostname'] = "NA"
|
||||
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
msg = "fetching configuration from %s is not supported"
|
||||
return self.invalid_params(msg % source)
|
||||
if source == 'running':
|
||||
cmd = 'show running-config'
|
||||
else:
|
||||
cmd = 'show startup-config'
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['configure terminal'], to_list(command), ['end']):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
|
||||
def set_cli_prompt_context(self):
|
||||
"""
|
||||
Make sure we are in the operational cli mode
|
||||
:return: None
|
||||
"""
|
||||
if self._connection.connected:
|
||||
out = self._connection.get_prompt()
|
||||
|
||||
if out is None:
|
||||
raise AnsibleConnectionFailure(message=u'cli prompt is not identified from the last received'
|
||||
u' response window: %s' % self._connection._last_recv_window)
|
||||
|
||||
if to_text(out, errors='surrogate_then_replace').strip().endswith(')#'):
|
||||
self._connection.queue_message('vvvv', 'In Config mode, sending exit to device')
|
||||
self._connection.send_command('exit')
|
||||
else:
|
||||
self._connection.send_command('enable')
|
||||
@@ -1,97 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2019 Ericsson AB.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
author: Ericsson IPOS OAM team
|
||||
cliconf: eccli
|
||||
short_description: Use eccli cliconf to run command on Ericsson ECCLI platform
|
||||
description:
|
||||
- This eccli plugin provides low level abstraction APIs for
|
||||
sending and receiving CLI commands from Ericsson ECCLI network devices.
|
||||
'''
|
||||
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
import collections
|
||||
import re
|
||||
import time
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig, dumps
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_config(self, source='running', flags=None, format=None):
|
||||
return
|
||||
|
||||
def edit_config(self, candidate=None, commit=True, replace=None, comment=None):
|
||||
return
|
||||
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False):
|
||||
if not command:
|
||||
raise ValueError('must provide value of command to execute')
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for get" % output)
|
||||
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
device_info['network_os'] = 'eric_eccli'
|
||||
return device_info
|
||||
|
||||
def get_capabilities(self):
|
||||
result = dict()
|
||||
result['rpc'] = self.get_base_rpc() + ['run_commands']
|
||||
result['network_api'] = 'cliconf'
|
||||
result['device_info'] = self.get_device_info()
|
||||
return json.dumps(result)
|
||||
|
||||
def run_commands(self, commands=None, check_rc=True):
|
||||
if commands is None:
|
||||
raise ValueError("'commands' value is required")
|
||||
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
if not isinstance(cmd, Mapping):
|
||||
cmd = {'command': cmd}
|
||||
|
||||
output = cmd.pop('output', None)
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for run_commands" % output)
|
||||
try:
|
||||
out = self.send_command(**cmd)
|
||||
except AnsibleConnectionFailure as e:
|
||||
if check_rc:
|
||||
raise
|
||||
out = getattr(e, 'err', e)
|
||||
|
||||
responses.append(out)
|
||||
|
||||
return responses
|
||||
@@ -1,229 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: exos
|
||||
short_description: Use exos cliconf to run command on Extreme EXOS platform
|
||||
description:
|
||||
- This exos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Extreme EXOS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.module_utils.connection import ConnectionError
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig, dumps
|
||||
from ansible.plugins.cliconf import CliconfBase
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_diff(self, candidate=None, running=None, diff_match='line', diff_ignore_lines=None, path=None, diff_replace='line'):
|
||||
diff = {}
|
||||
device_operations = self.get_device_operations()
|
||||
option_values = self.get_option_values()
|
||||
|
||||
if candidate is None and device_operations['supports_generate_diff']:
|
||||
raise ValueError("candidate configuration is required to generate diff")
|
||||
|
||||
if diff_match not in option_values['diff_match']:
|
||||
raise ValueError("'match' value %s in invalid, valid values are %s" % (diff_match, ', '.join(option_values['diff_match'])))
|
||||
|
||||
if diff_replace not in option_values['diff_replace']:
|
||||
raise ValueError("'replace' value %s in invalid, valid values are %s" % (diff_replace, ', '.join(option_values['diff_replace'])))
|
||||
|
||||
# prepare candidate configuration
|
||||
candidate_obj = NetworkConfig(indent=1)
|
||||
candidate_obj.load(candidate)
|
||||
|
||||
if running and diff_match != 'none' and diff_replace != 'config':
|
||||
# running configuration
|
||||
running_obj = NetworkConfig(indent=1, contents=running, ignore_lines=diff_ignore_lines)
|
||||
configdiffobjs = candidate_obj.difference(running_obj, path=path, match=diff_match, replace=diff_replace)
|
||||
|
||||
else:
|
||||
configdiffobjs = candidate_obj.items
|
||||
|
||||
diff['config_diff'] = dumps(configdiffobjs, 'commands') if configdiffobjs else ''
|
||||
return diff
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
device_info['network_os'] = 'exos'
|
||||
|
||||
reply = self.run_commands({'command': 'show switch detail', 'output': 'text'})
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'ExtremeXOS version (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'System Type: +(\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
match = re.search(r'SysName: +(\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
def get_default_flag(self):
|
||||
# The flag to modify the command to collect configuration with defaults
|
||||
return 'detail'
|
||||
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
options_values = self.get_option_values()
|
||||
if format not in options_values['format']:
|
||||
raise ValueError("'format' value %s is invalid. Valid values are %s" % (format, ','.join(options_values['format'])))
|
||||
|
||||
lookup = {'running': 'show configuration', 'startup': 'debug cfgmgr show configuration file'}
|
||||
if source not in lookup:
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
|
||||
cmd = {'command': lookup[source], 'output': 'text'}
|
||||
|
||||
if source == 'startup':
|
||||
reply = self.run_commands({'command': 'show switch', 'format': 'text'})
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
match = re.search(r'Config Selected: +(\S+)\.cfg', data, re.MULTILINE)
|
||||
if match:
|
||||
cmd['command'] += match.group(1)
|
||||
else:
|
||||
# No Startup(/Selected) Config
|
||||
return {}
|
||||
|
||||
cmd['command'] += ' '.join(to_list(flags))
|
||||
cmd['command'] = cmd['command'].strip()
|
||||
|
||||
return self.run_commands(cmd)[0]
|
||||
|
||||
def edit_config(self, candidate=None, commit=True, replace=None, diff=False, comment=None):
|
||||
resp = {}
|
||||
operations = self.get_device_operations()
|
||||
self.check_edit_config_capability(operations, candidate, commit, replace, comment)
|
||||
results = []
|
||||
requests = []
|
||||
|
||||
if commit:
|
||||
for line in to_list(candidate):
|
||||
if not isinstance(line, Mapping):
|
||||
line = {'command': line}
|
||||
results.append(self.send_command(**line))
|
||||
requests.append(line['command'])
|
||||
else:
|
||||
raise ValueError('check mode is not supported')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
return resp
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False):
|
||||
if output:
|
||||
command = self._get_command_with_output(command, output)
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def run_commands(self, commands=None, check_rc=True):
|
||||
if commands is None:
|
||||
raise ValueError("'commands' value is required")
|
||||
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
if not isinstance(cmd, Mapping):
|
||||
cmd = {'command': cmd}
|
||||
|
||||
output = cmd.pop('output', None)
|
||||
if output:
|
||||
cmd['command'] = self._get_command_with_output(cmd['command'], output)
|
||||
|
||||
try:
|
||||
out = self.send_command(**cmd)
|
||||
except AnsibleConnectionFailure as e:
|
||||
if check_rc is True:
|
||||
raise
|
||||
out = getattr(e, 'err', e)
|
||||
|
||||
if out is not None:
|
||||
try:
|
||||
out = to_text(out, errors='surrogate_or_strict').strip()
|
||||
except UnicodeError:
|
||||
raise ConnectionError(message=u'Failed to decode output from %s: %s' % (cmd, to_text(out)))
|
||||
|
||||
if output and output == 'json':
|
||||
try:
|
||||
out = json.loads(out)
|
||||
except ValueError:
|
||||
raise ConnectionError('Response was not valid JSON, got {0}'.format(
|
||||
to_text(out)
|
||||
))
|
||||
responses.append(out)
|
||||
|
||||
return responses
|
||||
|
||||
def get_device_operations(self):
|
||||
return {
|
||||
'supports_diff_replace': False, # identify if config should be merged or replaced is supported
|
||||
'supports_commit': False, # identify if commit is supported by device or not
|
||||
'supports_rollback': False, # identify if rollback is supported or not
|
||||
'supports_defaults': True, # identify if fetching running config with default is supported
|
||||
'supports_commit_comment': False, # identify if adding comment to commit is supported of not
|
||||
'supports_onbox_diff': False, # identify if on box diff capability is supported or not
|
||||
'supports_generate_diff': True, # identify if diff capability is supported within plugin
|
||||
'supports_multiline_delimiter': False, # identify if multiline delimiter is supported within config
|
||||
'supports_diff_match': True, # identify if match is supported
|
||||
'supports_diff_ignore_lines': True, # identify if ignore line in diff is supported
|
||||
'supports_config_replace': False, # identify if running config replace with candidate config is supported
|
||||
'supports_admin': False, # identify if admin configure mode is supported or not
|
||||
'supports_commit_label': False, # identify if commit label is supported or not
|
||||
'supports_replace': False
|
||||
}
|
||||
|
||||
def get_option_values(self):
|
||||
return {
|
||||
'format': ['text', 'json'],
|
||||
'diff_match': ['line', 'strict', 'exact', 'none'],
|
||||
'diff_replace': ['line', 'block'],
|
||||
'output': ['text', 'json']
|
||||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
result['rpc'] += ['run_commmands', 'get_default_flag', 'get_diff']
|
||||
result['device_operations'] = self.get_device_operations()
|
||||
result['device_info'] = self.get_device_info()
|
||||
result.update(self.get_option_values())
|
||||
return json.dumps(result)
|
||||
|
||||
def _get_command_with_output(self, command, output):
|
||||
if output not in self.get_option_values().get('output'):
|
||||
raise ValueError("'output' value is %s is invalid. Valid values are %s" % (output, ','.join(self.get_option_values().get('output'))))
|
||||
|
||||
if output == 'json' and not command.startswith('run script cli2json.py'):
|
||||
cmd = 'run script cli2json.py %s' % command
|
||||
else:
|
||||
cmd = command
|
||||
return cmd
|
||||
@@ -1,314 +0,0 @@
|
||||
# Copyright: (c) 2019, 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
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
author: Ruckus Wireless (@Commscope)
|
||||
cliconf: icx
|
||||
short_description: Use icx cliconf to run command on Ruckus ICX platform
|
||||
description:
|
||||
- This icx plugin provides low level abstraction APIs for
|
||||
sending and receiving CLI commands from Ruckus ICX network devices.
|
||||
'''
|
||||
|
||||
|
||||
import re
|
||||
import time
|
||||
import json
|
||||
import os
|
||||
|
||||
from itertools import chain
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig, dumps
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', flags=None, format=None, compare=None):
|
||||
if source not in ('running', 'startup'):
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if format:
|
||||
raise ValueError("'format' value %s is not supported for get_config" % format)
|
||||
|
||||
if not flags:
|
||||
flags = []
|
||||
|
||||
if compare is False:
|
||||
return ''
|
||||
else:
|
||||
if source == 'running':
|
||||
cmd = 'show running-config '
|
||||
else:
|
||||
cmd = 'show configuration '
|
||||
|
||||
cmd += ' '.join(to_list(flags))
|
||||
cmd = cmd.strip()
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
def get_diff(self, candidate=None, running=None, diff_match='line', diff_ignore_lines=None, path=None, diff_replace='line'):
|
||||
"""
|
||||
Generate diff between candidate and running configuration. If the
|
||||
remote host supports onbox diff capabilities ie. supports_onbox_diff in that case
|
||||
candidate and running configurations are not required to be passed as argument.
|
||||
In case if onbox diff capability is not supported candidate argument is mandatory
|
||||
and running argument is optional.
|
||||
:param candidate: The configuration which is expected to be present on remote host.
|
||||
:param running: The base configuration which is used to generate diff.
|
||||
:param diff_match: Instructs how to match the candidate configuration with current device configuration
|
||||
Valid values are 'line', 'strict', 'exact', 'none'.
|
||||
'line' - commands are matched line by line
|
||||
'strict' - command lines are matched with respect to position
|
||||
'exact' - command lines must be an equal match
|
||||
'none' - will not compare the candidate configuration with the running configuration
|
||||
:param diff_ignore_lines: Use this argument to specify one or more lines that should be
|
||||
ignored during the diff. This is used for lines in the configuration
|
||||
that are automatically updated by the system. This argument takes
|
||||
a list of regular expressions or exact line matches.
|
||||
:param path: The ordered set of parents that uniquely identify the section or hierarchy
|
||||
the commands should be checked against. If the parents argument
|
||||
is omitted, the commands are checked against the set of top
|
||||
level or global commands.
|
||||
:param diff_replace: Instructs on the way to perform the configuration on the device.
|
||||
If the replace argument is set to I(line) then the modified lines are
|
||||
pushed to the device in configuration mode. If the replace argument is
|
||||
set to I(block) then the entire command block is pushed to the device in
|
||||
configuration mode if any line is not correct.
|
||||
:return: Configuration diff in json format.
|
||||
{
|
||||
'config_diff': '',
|
||||
'banner_diff': {}
|
||||
}
|
||||
|
||||
"""
|
||||
diff = {}
|
||||
device_operations = self.get_device_operations()
|
||||
option_values = self.get_option_values()
|
||||
|
||||
if candidate is None and device_operations['supports_generate_diff']:
|
||||
raise ValueError("candidate configuration is required to generate diff")
|
||||
|
||||
if diff_match not in option_values['diff_match']:
|
||||
raise ValueError("'match' value %s in invalid, valid values are %s" % (diff_match, ', '.join(option_values['diff_match'])))
|
||||
|
||||
if diff_replace not in option_values['diff_replace']:
|
||||
raise ValueError("'replace' value %s in invalid, valid values are %s" % (diff_replace, ', '.join(option_values['diff_replace'])))
|
||||
|
||||
# prepare candidate configuration
|
||||
candidate_obj = NetworkConfig(indent=1)
|
||||
want_src, want_banners = self._extract_banners(candidate)
|
||||
candidate_obj.load(want_src)
|
||||
|
||||
if running and diff_match != 'none':
|
||||
# running configuration
|
||||
have_src, have_banners = self._extract_banners(running)
|
||||
|
||||
running_obj = NetworkConfig(indent=1, contents=have_src, ignore_lines=diff_ignore_lines)
|
||||
configdiffobjs = candidate_obj.difference(running_obj, path=path, match=diff_match, replace=diff_replace)
|
||||
|
||||
else:
|
||||
configdiffobjs = candidate_obj.items
|
||||
have_banners = {}
|
||||
|
||||
diff['config_diff'] = dumps(configdiffobjs, 'commands') if configdiffobjs else ''
|
||||
|
||||
banners = self._diff_banners(want_banners, have_banners)
|
||||
diff['banner_diff'] = banners if banners else {}
|
||||
return diff
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, candidate=None, commit=True, replace=None, comment=None):
|
||||
resp = {}
|
||||
operations = self.get_device_operations()
|
||||
self.check_edit_config_capability(operations, candidate, commit, replace, comment)
|
||||
|
||||
results = []
|
||||
requests = []
|
||||
if commit:
|
||||
prompt = self._connection.get_prompt()
|
||||
if (b'(config-if' in prompt) or (b'(config' in prompt) or (b'(config-lag-if' in prompt):
|
||||
self.send_command('end')
|
||||
|
||||
self.send_command('configure terminal')
|
||||
|
||||
for line in to_list(candidate):
|
||||
if not isinstance(line, Mapping):
|
||||
line = {'command': line}
|
||||
|
||||
cmd = line['command']
|
||||
if cmd != 'end' and cmd[0] != '!':
|
||||
results.append(self.send_command(**line))
|
||||
requests.append(cmd)
|
||||
|
||||
self.send_command('end')
|
||||
else:
|
||||
raise ValueError('check mode is not supported')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
return resp
|
||||
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, check_all=False):
|
||||
if not command:
|
||||
raise ValueError('must provide value of command to execute')
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for get" % output)
|
||||
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, check_all=check_all)
|
||||
|
||||
def scp(self, command=None, scp_user=None, scp_pass=None):
|
||||
if not command:
|
||||
raise ValueError('must provide value of command to execute')
|
||||
prompt = ["User name:", "Password:"]
|
||||
if(scp_pass is None):
|
||||
answer = [scp_user, self._connection._play_context.password]
|
||||
else:
|
||||
answer = [scp_user, scp_pass]
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=False, check_all=True)
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'icx'
|
||||
reply = self.get(command='show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Version (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1).strip(',')
|
||||
|
||||
match = re.search(r'^Cisco (.+) \(revision', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
match = re.search(r'^(.+) uptime', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
def get_device_operations(self):
|
||||
return {
|
||||
'supports_diff_replace': True,
|
||||
'supports_commit': False,
|
||||
'supports_rollback': False,
|
||||
'supports_defaults': True,
|
||||
'supports_onbox_diff': False,
|
||||
'supports_commit_comment': False,
|
||||
'supports_multiline_delimiter': True,
|
||||
'supports_diff_match': True,
|
||||
'supports_diff_ignore_lines': True,
|
||||
'supports_generate_diff': True,
|
||||
'supports_replace': False
|
||||
}
|
||||
|
||||
def get_option_values(self):
|
||||
return {
|
||||
'format': ['text'],
|
||||
'diff_match': ['line', 'strict', 'exact', 'none'],
|
||||
'diff_replace': ['line', 'block'],
|
||||
'output': []
|
||||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
result = dict()
|
||||
result['rpc'] = self.get_base_rpc() + ['edit_banner', 'get_diff', 'run_commands', 'get_defaults_flag']
|
||||
result['network_api'] = 'cliconf'
|
||||
result['device_operations'] = self.get_device_operations()
|
||||
result.update(self.get_option_values())
|
||||
return json.dumps(result)
|
||||
|
||||
def edit_banner(self, candidate=None, multiline_delimiter="@", commit=True):
|
||||
"""
|
||||
Edit banner on remote device
|
||||
:param banners: Banners to be loaded in json format
|
||||
:param multiline_delimiter: Line delimiter for banner
|
||||
:param commit: Boolean value that indicates if the device candidate
|
||||
configuration should be pushed in the running configuration or discarded.
|
||||
:param diff: Boolean flag to indicate if configuration that is applied on remote host should
|
||||
generated and returned in response or not
|
||||
:return: Returns response of executing the configuration command received
|
||||
from remote host
|
||||
"""
|
||||
resp = {}
|
||||
banners_obj = json.loads(candidate)
|
||||
results = []
|
||||
requests = []
|
||||
if commit:
|
||||
for key, value in iteritems(banners_obj):
|
||||
key += ' %s' % multiline_delimiter
|
||||
self.send_command('config terminal', sendonly=True)
|
||||
for cmd in [key, value, multiline_delimiter]:
|
||||
obj = {'command': cmd, 'sendonly': True}
|
||||
results.append(self.send_command(**obj))
|
||||
requests.append(cmd)
|
||||
|
||||
self.send_command('end', sendonly=True)
|
||||
time.sleep(0.1)
|
||||
results.append(self.send_command('\n'))
|
||||
requests.append('\n')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
|
||||
return resp
|
||||
|
||||
def run_commands(self, commands=None, check_rc=True):
|
||||
if commands is None:
|
||||
raise ValueError("'commands' value is required")
|
||||
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
if not isinstance(cmd, Mapping):
|
||||
cmd = {'command': cmd}
|
||||
|
||||
output = cmd.pop('output', None)
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for run_commands" % output)
|
||||
|
||||
try:
|
||||
out = self.send_command(**cmd)
|
||||
except AnsibleConnectionFailure as e:
|
||||
if check_rc:
|
||||
raise
|
||||
out = getattr(e, 'err', to_text(e))
|
||||
|
||||
responses.append(out)
|
||||
|
||||
return responses
|
||||
|
||||
def _extract_banners(self, config):
|
||||
banners = {}
|
||||
banner_cmds = re.findall(r'^banner (\w+)', config, re.M)
|
||||
for cmd in banner_cmds:
|
||||
regex = r'banner %s \$(.+?)(?=\$)' % cmd
|
||||
match = re.search(regex, config, re.S)
|
||||
if match:
|
||||
key = 'banner %s' % cmd
|
||||
banners[key] = match.group(1).strip()
|
||||
|
||||
for cmd in banner_cmds:
|
||||
regex = r'banner %s \$(.+?)(?=\$)' % cmd
|
||||
match = re.search(regex, config, re.S)
|
||||
if match:
|
||||
config = config.replace(str(match.group(1)), '')
|
||||
|
||||
config = re.sub(r'banner \w+ \$\$', '!! banner removed', config)
|
||||
return config, banners
|
||||
|
||||
def _diff_banners(self, want, have):
|
||||
candidate = {}
|
||||
for key, value in iteritems(want):
|
||||
if value != have.get(key):
|
||||
candidate[key] = value
|
||||
return candidate
|
||||
@@ -1,95 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: ironware
|
||||
short_description: Use ironware cliconf to run command on Extreme Ironware platform
|
||||
description:
|
||||
- This ironware plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Extreme Ironware network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'ironware'
|
||||
reply = self.send_command('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'IronWare : Version (\S+),', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'^(?:System Mode\:|System\:) (CES|CER|MLX|XMR)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if source == 'running':
|
||||
cmd = 'show running-config'
|
||||
if flags is not None:
|
||||
cmd += ' ' + ' '.join(flags)
|
||||
|
||||
else:
|
||||
cmd = 'show configuration'
|
||||
if flags is not None:
|
||||
raise ValueError("flags are only supported with running-config")
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['configure terminal'], to_list(command), ['end']):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
|
||||
def set_cli_prompt_context(self):
|
||||
"""
|
||||
Make sure we are in the operational cli mode
|
||||
:return: None
|
||||
"""
|
||||
if self._connection.connected:
|
||||
self._update_cli_prompt_context(config_context=')#')
|
||||
@@ -1,74 +0,0 @@
|
||||
#
|
||||
# (c) 2016 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: netvisor
|
||||
short_description: Use netvisor cliconf to run command on Pluribus netvisor platform
|
||||
description:
|
||||
- This netvisor plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Pluribus netvisor devices.
|
||||
'''
|
||||
|
||||
import json
|
||||
from ansible.plugins.cliconf import CliconfBase
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running'):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
cmd = 'show running-config'
|
||||
return self.send_command(cmd)
|
||||
|
||||
def edit_config(self, command):
|
||||
return
|
||||
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False):
|
||||
if not command:
|
||||
raise ValueError('must provide value of command to execute')
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for get" % output)
|
||||
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_option_values(self):
|
||||
return {
|
||||
'format': ['text'],
|
||||
'diff_match': ['line', 'strict', 'exact', 'none'],
|
||||
'diff_replace': ['line', 'block'],
|
||||
'output': []
|
||||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
result = dict()
|
||||
result['rpc'] = self.get_base_rpc()
|
||||
result['network_api'] = 'cliconf'
|
||||
result['device_info'] = self.get_device_info()
|
||||
result.update(self.get_option_values())
|
||||
return json.dumps(result)
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
device_info['network_os'] = 'netvisor'
|
||||
|
||||
return device_info
|
||||
@@ -1,112 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: nos
|
||||
short_description: Use nos cliconf to run command on Extreme NOS platform
|
||||
description:
|
||||
- This nos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Extreme NOS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'nos'
|
||||
reply = self.get('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'Network Operating System Version: (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
reply = self.get('show chassis')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'^Chassis Name:(\s+)(\S+)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(2)
|
||||
|
||||
reply = self.get('show running-config | inc "switch-attributes host-name"')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'switch-attributes host-name (\S+)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
def get_config(self, source='running', flags=None):
|
||||
if source not in 'running':
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
if source == 'running':
|
||||
cmd = 'show running-config'
|
||||
|
||||
flags = [] if flags is None else flags
|
||||
cmd += ' '.join(flags)
|
||||
cmd = cmd.strip()
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
def edit_config(self, command):
|
||||
resp = {}
|
||||
results = []
|
||||
requests = []
|
||||
self.send_command('configure terminal')
|
||||
for cmd in to_list(command):
|
||||
if isinstance(cmd, dict):
|
||||
command = cmd['command']
|
||||
prompt = cmd['prompt']
|
||||
answer = cmd['answer']
|
||||
newline = cmd.get('newline', True)
|
||||
else:
|
||||
command = cmd
|
||||
prompt = None
|
||||
answer = None
|
||||
newline = True
|
||||
|
||||
if cmd != 'end' and cmd[0] != '!':
|
||||
results.append(self.send_command(command, prompt, answer, False, newline))
|
||||
requests.append(cmd)
|
||||
|
||||
self.send_command('end')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
return resp
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
@@ -1,77 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: onyx
|
||||
short_description: Use onyx cliconf to run command on Mellanox ONYX platform
|
||||
description:
|
||||
- This onyx plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Mellanox ONYX network devices.
|
||||
'''
|
||||
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
reply = self.get('show version | json-print')
|
||||
data = json.loads(reply)
|
||||
device_info['network_os'] = data['Product name']
|
||||
device_info['network_os_version'] = data['Product release']
|
||||
device_info['network_os_version_summary'] = data['Version summary']
|
||||
device_info['network_os_model'] = data['Product model']
|
||||
|
||||
reply = self.get('show hosts | include Hostname')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
hostname = data.split(':')[1]
|
||||
hostname = hostname.strip()
|
||||
device_info['network_os_hostname'] = hostname
|
||||
|
||||
return device_info
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
if source not in ('running',):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
cmd = 'show running-config'
|
||||
return self.send_command(cmd)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['configure terminal'], to_list(command), ['exit']):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
@@ -1,78 +0,0 @@
|
||||
#
|
||||
# (c) 2017 Red Hat Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: routeros
|
||||
short_description: Use routeros cliconf to run command on MikroTik RouterOS platform
|
||||
description:
|
||||
- This routeros plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from MikroTik RouterOS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
device_info['network_os'] = 'RouterOS'
|
||||
|
||||
resource = self.get('/system resource print')
|
||||
data = to_text(resource, errors='surrogate_or_strict').strip()
|
||||
match = re.search(r'version: (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
routerboard = self.get('/system routerboard print')
|
||||
data = to_text(routerboard, errors='surrogate_or_strict').strip()
|
||||
match = re.search(r'model: (.+)$', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
identity = self.get('/system identity print')
|
||||
data = to_text(identity, errors='surrogate_or_strict').strip()
|
||||
match = re.search(r'name: (.+)$', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
def get_config(self, source='running', format='text', flags=None):
|
||||
return
|
||||
|
||||
def edit_config(self, command):
|
||||
return
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
@@ -1,104 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: slxos
|
||||
short_description: Use slxos cliconf to run command on Extreme SLX-OS platform
|
||||
description:
|
||||
- This slxos plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Extreme SLX-OS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from itertools import chain
|
||||
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible.plugins.cliconf import CliconfBase
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'slxos'
|
||||
reply = self.get('show version')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'SLX\-OS Operating System Version: (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
reply = self.get('show chassis')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'^Chassis Name:(\s+)(\S+)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(2)
|
||||
|
||||
reply = self.get('show running-config | inc "switch-attributes host-name"')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'switch-attributes host-name (\S+)', data, re.M)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
def get_config(self, source='running', flags=None):
|
||||
if source not in ('running', 'startup'):
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
if source == 'running':
|
||||
cmd = 'show running-config'
|
||||
else:
|
||||
cmd = 'show startup-config'
|
||||
|
||||
flags = [] if flags is None else flags
|
||||
cmd += ' '.join(flags)
|
||||
cmd = cmd.strip()
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['configure terminal'], to_list(command), ['end']):
|
||||
if isinstance(cmd, dict):
|
||||
command = cmd['command']
|
||||
prompt = cmd['prompt']
|
||||
answer = cmd['answer']
|
||||
newline = cmd.get('newline', True)
|
||||
else:
|
||||
command = cmd
|
||||
prompt = None
|
||||
answer = None
|
||||
newline = True
|
||||
|
||||
self.send_command(command, prompt, answer, False, newline)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
return json.dumps(result)
|
||||
@@ -1,235 +0,0 @@
|
||||
#
|
||||
# (c) 2018 Extreme Networks Inc.
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
cliconf: voss
|
||||
short_description: Use voss cliconf to run command on Extreme VOSS platform
|
||||
description:
|
||||
- This voss plugin provides low level abstraction apis for
|
||||
sending and receiving CLI commands from Extreme VOSS network devices.
|
||||
'''
|
||||
|
||||
import re
|
||||
import json
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.common._collections_compat import Mapping
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig, dumps
|
||||
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
|
||||
from ansible_collections.community.general.plugins.module_utils.network.voss.voss import VossNetworkConfig
|
||||
from ansible.plugins.cliconf import CliconfBase, enable_mode
|
||||
|
||||
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', flags=None, format=None):
|
||||
if source not in ('running', 'startup'):
|
||||
raise ValueError("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if format:
|
||||
raise ValueError("'format' value %s is not supported for get_config" % format)
|
||||
|
||||
if not flags:
|
||||
flags = []
|
||||
if source == 'running':
|
||||
cmd = 'show running-config '
|
||||
cmd += ' '.join(to_list(flags))
|
||||
cmd = cmd.strip()
|
||||
else:
|
||||
cmd = 'more /intflash/config.cfg'
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
def get_diff(self, candidate=None, running=None, diff_match='line', diff_ignore_lines=None, path=None, diff_replace='line'):
|
||||
"""
|
||||
Generate diff between candidate and running configuration. If the
|
||||
remote host supports onbox diff capabilities ie. supports_onbox_diff in that case
|
||||
candidate and running configurations are not required to be passed as argument.
|
||||
In case if onbox diff capability is not supported candidate argument is mandatory
|
||||
and running argument is optional.
|
||||
:param candidate: The configuration which is expected to be present on remote host.
|
||||
:param running: The base configuration which is used to generate diff.
|
||||
:param diff_match: Instructs how to match the candidate configuration with current device configuration
|
||||
Valid values are 'line', 'strict', 'exact', 'none'.
|
||||
'line' - commands are matched line by line
|
||||
'strict' - command lines are matched with respect to position
|
||||
'exact' - command lines must be an equal match
|
||||
'none' - will not compare the candidate configuration with the running configuration
|
||||
:param diff_ignore_lines: Use this argument to specify one or more lines that should be
|
||||
ignored during the diff. This is used for lines in the configuration
|
||||
that are automatically updated by the system. This argument takes
|
||||
a list of regular expressions or exact line matches.
|
||||
:param path: The ordered set of parents that uniquely identify the section or hierarchy
|
||||
the commands should be checked against. If the parents argument
|
||||
is omitted, the commands are checked against the set of top
|
||||
level or global commands.
|
||||
:param diff_replace: Instructs on the way to perform the configuration on the device.
|
||||
If the replace argument is set to I(line) then the modified lines are
|
||||
pushed to the device in configuration mode. If the replace argument is
|
||||
set to I(block) then the entire command block is pushed to the device in
|
||||
configuration mode if any line is not correct.
|
||||
:return: Configuration diff in json format.
|
||||
{
|
||||
'config_diff': '',
|
||||
}
|
||||
|
||||
"""
|
||||
diff = {}
|
||||
|
||||
device_operations = self.get_device_operations()
|
||||
option_values = self.get_option_values()
|
||||
|
||||
if candidate is None and device_operations['supports_generate_diff']:
|
||||
raise ValueError("candidate configuration is required to generate diff")
|
||||
|
||||
if diff_match not in option_values['diff_match']:
|
||||
raise ValueError("'match' value %s in invalid, valid values are %s" % (diff_match, ', '.join(option_values['diff_match'])))
|
||||
|
||||
if diff_replace not in option_values['diff_replace']:
|
||||
raise ValueError("'replace' value %s in invalid, valid values are %s" % (diff_replace, ', '.join(option_values['diff_replace'])))
|
||||
|
||||
# prepare candidate configuration
|
||||
candidate_obj = VossNetworkConfig(indent=0, ignore_lines=diff_ignore_lines)
|
||||
candidate_obj.load(candidate)
|
||||
|
||||
if running and diff_match != 'none':
|
||||
# running configuration
|
||||
running_obj = VossNetworkConfig(indent=0, contents=running, ignore_lines=diff_ignore_lines)
|
||||
configdiffobjs = candidate_obj.difference(running_obj, path=path, match=diff_match, replace=diff_replace)
|
||||
|
||||
else:
|
||||
configdiffobjs = candidate_obj.items
|
||||
|
||||
diff['config_diff'] = dumps(configdiffobjs, 'commands') if configdiffobjs else ''
|
||||
diff['diff_path'] = path
|
||||
diff['diff_replace'] = diff_replace
|
||||
return diff
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, candidate=None, commit=True, replace=None, comment=None):
|
||||
resp = {}
|
||||
operations = self.get_device_operations()
|
||||
self.check_edit_config_capability(operations, candidate, commit, replace, comment)
|
||||
|
||||
results = []
|
||||
requests = []
|
||||
if commit:
|
||||
self.send_command('configure terminal')
|
||||
for line in to_list(candidate):
|
||||
if not isinstance(line, Mapping):
|
||||
line = {'command': line}
|
||||
|
||||
cmd = line['command']
|
||||
if cmd != 'end' and cmd[0] != '!':
|
||||
results.append(self.send_command(**line))
|
||||
requests.append(cmd)
|
||||
|
||||
self.send_command('end')
|
||||
else:
|
||||
raise ValueError('check mode is not supported')
|
||||
|
||||
resp['request'] = requests
|
||||
resp['response'] = results
|
||||
return resp
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def get_device_info(self):
|
||||
device_info = {}
|
||||
|
||||
device_info['network_os'] = 'voss'
|
||||
reply = self.get(command='show sys-info')
|
||||
data = to_text(reply, errors='surrogate_or_strict').strip()
|
||||
|
||||
match = re.search(r'SysDescr\s+: \S+ \((\S+)\)', data)
|
||||
if match:
|
||||
device_info['network_os_version'] = match.group(1)
|
||||
|
||||
match = re.search(r'Chassis\s+: (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_model'] = match.group(1)
|
||||
|
||||
match = re.search(r'SysName\s+: (\S+)', data)
|
||||
if match:
|
||||
device_info['network_os_hostname'] = match.group(1)
|
||||
|
||||
return device_info
|
||||
|
||||
def get_device_operations(self):
|
||||
return {
|
||||
'supports_diff_replace': True,
|
||||
'supports_commit': False,
|
||||
'supports_rollback': False,
|
||||
'supports_defaults': True,
|
||||
'supports_onbox_diff': False,
|
||||
'supports_commit_comment': False,
|
||||
'supports_multiline_delimiter': False,
|
||||
'supports_diff_match': True,
|
||||
'supports_diff_ignore_lines': True,
|
||||
'supports_generate_diff': True,
|
||||
'supports_replace': False
|
||||
}
|
||||
|
||||
def get_option_values(self):
|
||||
return {
|
||||
'format': ['text'],
|
||||
'diff_match': ['line', 'strict', 'exact', 'none'],
|
||||
'diff_replace': ['line', 'block'],
|
||||
'output': []
|
||||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
result = super(Cliconf, self).get_capabilities()
|
||||
result['rpc'] += ['get_diff', 'run_commands', 'get_defaults_flag']
|
||||
result['device_operations'] = self.get_device_operations()
|
||||
result.update(self.get_option_values())
|
||||
return json.dumps(result)
|
||||
|
||||
def run_commands(self, commands=None, check_rc=True):
|
||||
if commands is None:
|
||||
raise ValueError("'commands' value is required")
|
||||
|
||||
responses = list()
|
||||
for cmd in to_list(commands):
|
||||
if not isinstance(cmd, Mapping):
|
||||
cmd = {'command': cmd}
|
||||
|
||||
output = cmd.pop('output', None)
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for run_commands" % output)
|
||||
|
||||
try:
|
||||
out = self.send_command(**cmd)
|
||||
except AnsibleConnectionFailure as e:
|
||||
if check_rc:
|
||||
raise
|
||||
out = getattr(e, 'err', e)
|
||||
|
||||
responses.append(out)
|
||||
|
||||
return responses
|
||||
|
||||
def get_defaults_flag(self):
|
||||
return 'verbose'
|
||||
@@ -274,9 +274,13 @@ class Connection(ConnectionBase):
|
||||
|
||||
Can revisit using $HOME instead if it's a problem
|
||||
'''
|
||||
if not remote_path.startswith(os.path.sep):
|
||||
remote_path = os.path.join(os.path.sep, remote_path)
|
||||
return os.path.normpath(remote_path)
|
||||
if getattr(self._shell, "_IS_WINDOWS", False):
|
||||
import ntpath
|
||||
return ntpath.normpath(remote_path)
|
||||
else:
|
||||
if not remote_path.startswith(os.path.sep):
|
||||
remote_path = os.path.join(os.path.sep, remote_path)
|
||||
return os.path.normpath(remote_path)
|
||||
|
||||
def put_file(self, in_path, out_path):
|
||||
""" Transfer a file from local to docker container """
|
||||
@@ -328,7 +332,11 @@ class Connection(ConnectionBase):
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
p.communicate()
|
||||
|
||||
actual_out_path = os.path.join(out_dir, os.path.basename(in_path))
|
||||
if getattr(self._shell, "_IS_WINDOWS", False):
|
||||
import ntpath
|
||||
actual_out_path = ntpath.join(out_dir, ntpath.basename(in_path))
|
||||
else:
|
||||
actual_out_path = os.path.join(out_dir, os.path.basename(in_path))
|
||||
|
||||
if p.returncode != 0:
|
||||
# Older docker doesn't have native support for fetching files command `cp`
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
# Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
|
||||
# (c) 2013, Michael Scherer <misc@zarb.org>
|
||||
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
# (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
|
||||
|
||||
DOCUMENTATION = '''
|
||||
author: Michael Scherer <misc@zarb.org>
|
||||
connection: libvirt_lxc
|
||||
short_description: Run tasks in lxc containers via libvirt
|
||||
description:
|
||||
- Run commands or put/fetch files to an existing lxc container using libvirt
|
||||
options:
|
||||
remote_addr:
|
||||
description:
|
||||
- Container identifier
|
||||
default: The set user as per docker's configuration
|
||||
vars:
|
||||
- name: ansible_host
|
||||
- name: ansible_libvirt_lxc_host
|
||||
'''
|
||||
|
||||
import distutils.spawn
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
import traceback
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.errors import AnsibleError
|
||||
from ansible.module_utils.six.moves import shlex_quote
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.plugins.connection import ConnectionBase, BUFSIZE
|
||||
from ansible.utils.display import Display
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
class Connection(ConnectionBase):
|
||||
''' Local lxc based connections '''
|
||||
|
||||
transport = 'community.general.libvirt_lxc'
|
||||
has_pipelining = True
|
||||
# su currently has an undiagnosed issue with calculating the file
|
||||
# checksums (so copy, for instance, doesn't work right)
|
||||
# Have to look into that before re-enabling this
|
||||
default_user = 'root'
|
||||
has_tty = False
|
||||
|
||||
def __init__(self, play_context, new_stdin, *args, **kwargs):
|
||||
super(Connection, self).__init__(play_context, new_stdin, *args, **kwargs)
|
||||
self.lxc = self._play_context.remote_addr
|
||||
|
||||
self.virsh = self._search_executable('virsh')
|
||||
|
||||
self._check_domain(self.lxc)
|
||||
|
||||
def _search_executable(self, executable):
|
||||
cmd = distutils.spawn.find_executable(executable)
|
||||
if not cmd:
|
||||
raise AnsibleError("%s command not found in PATH") % executable
|
||||
return cmd
|
||||
|
||||
def _check_domain(self, domain):
|
||||
p = subprocess.Popen([self.virsh, '-q', '-c', 'lxc:///', 'dominfo', to_bytes(domain)],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
p.communicate()
|
||||
if p.returncode:
|
||||
raise AnsibleError("%s is not a lxc defined in libvirt" % domain)
|
||||
|
||||
def _connect(self):
|
||||
''' connect to the lxc; nothing to do here '''
|
||||
super(Connection, self)._connect()
|
||||
if not self._connected:
|
||||
display.vvv("THIS IS A LOCAL LXC DIR", host=self.lxc)
|
||||
self._connected = True
|
||||
|
||||
def _buffered_exec_command(self, cmd, stdin=subprocess.PIPE):
|
||||
''' run a command on the chroot. This is only needed for implementing
|
||||
put_file() get_file() so that we don't have to read the whole file
|
||||
into memory.
|
||||
|
||||
compared to exec_command() it looses some niceties like being able to
|
||||
return the process's exit code immediately.
|
||||
'''
|
||||
executable = C.DEFAULT_EXECUTABLE.split()[0] if C.DEFAULT_EXECUTABLE else '/bin/sh'
|
||||
local_cmd = [self.virsh, '-q', '-c', 'lxc:///', 'lxc-enter-namespace']
|
||||
|
||||
if C.DEFAULT_LIBVIRT_LXC_NOSECLABEL:
|
||||
local_cmd += ['--noseclabel']
|
||||
|
||||
local_cmd += [self.lxc, '--', executable, '-c', cmd]
|
||||
|
||||
display.vvv("EXEC %s" % (local_cmd,), host=self.lxc)
|
||||
local_cmd = [to_bytes(i, errors='surrogate_or_strict') for i in local_cmd]
|
||||
p = subprocess.Popen(local_cmd, shell=False, stdin=stdin,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
return p
|
||||
|
||||
def exec_command(self, cmd, in_data=None, sudoable=False):
|
||||
''' run a command on the chroot '''
|
||||
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
||||
|
||||
p = self._buffered_exec_command(cmd)
|
||||
|
||||
stdout, stderr = p.communicate(in_data)
|
||||
return (p.returncode, stdout, stderr)
|
||||
|
||||
def _prefix_login_path(self, remote_path):
|
||||
''' Make sure that we put files into a standard path
|
||||
|
||||
If a path is relative, then we need to choose where to put it.
|
||||
ssh chooses $HOME but we aren't guaranteed that a home dir will
|
||||
exist in any given chroot. So for now we're choosing "/" instead.
|
||||
This also happens to be the former default.
|
||||
|
||||
Can revisit using $HOME instead if it's a problem
|
||||
'''
|
||||
if not remote_path.startswith(os.path.sep):
|
||||
remote_path = os.path.join(os.path.sep, remote_path)
|
||||
return os.path.normpath(remote_path)
|
||||
|
||||
def put_file(self, in_path, out_path):
|
||||
''' transfer a file from local to lxc '''
|
||||
super(Connection, self).put_file(in_path, out_path)
|
||||
display.vvv("PUT %s TO %s" % (in_path, out_path), host=self.lxc)
|
||||
|
||||
out_path = shlex_quote(self._prefix_login_path(out_path))
|
||||
try:
|
||||
with open(to_bytes(in_path, errors='surrogate_or_strict'), 'rb') as in_file:
|
||||
if not os.fstat(in_file.fileno()).st_size:
|
||||
count = ' count=0'
|
||||
else:
|
||||
count = ''
|
||||
try:
|
||||
p = self._buffered_exec_command('dd of=%s bs=%s%s' % (out_path, BUFSIZE, count), stdin=in_file)
|
||||
except OSError:
|
||||
raise AnsibleError("chroot connection requires dd command in the chroot")
|
||||
try:
|
||||
stdout, stderr = p.communicate()
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
raise AnsibleError("failed to transfer file %s to %s" % (in_path, out_path))
|
||||
if p.returncode != 0:
|
||||
raise AnsibleError("failed to transfer file %s to %s:\n%s\n%s" % (in_path, out_path, stdout, stderr))
|
||||
except IOError:
|
||||
raise AnsibleError("file or module does not exist at: %s" % in_path)
|
||||
|
||||
def fetch_file(self, in_path, out_path):
|
||||
''' fetch a file from lxc to local '''
|
||||
super(Connection, self).fetch_file(in_path, out_path)
|
||||
display.vvv("FETCH %s TO %s" % (in_path, out_path), host=self.lxc)
|
||||
|
||||
in_path = shlex_quote(self._prefix_login_path(in_path))
|
||||
try:
|
||||
p = self._buffered_exec_command('dd if=%s bs=%s' % (in_path, BUFSIZE))
|
||||
except OSError:
|
||||
raise AnsibleError("chroot connection requires dd command in the chroot")
|
||||
|
||||
with open(to_bytes(out_path, errors='surrogate_or_strict'), 'wb+') as out_file:
|
||||
try:
|
||||
chunk = p.stdout.read(BUFSIZE)
|
||||
while chunk:
|
||||
out_file.write(chunk)
|
||||
chunk = p.stdout.read(BUFSIZE)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
raise AnsibleError("failed to transfer file %s to %s" % (in_path, out_path))
|
||||
stdout, stderr = p.communicate()
|
||||
if p.returncode != 0:
|
||||
raise AnsibleError("failed to transfer file %s to %s:\n%s\n%s" % (in_path, out_path, stdout, stderr))
|
||||
|
||||
def close(self):
|
||||
''' terminate the connection; nothing to do here '''
|
||||
super(Connection, self).close()
|
||||
self._connected = False
|
||||
@@ -85,7 +85,7 @@ DOCUMENTATION = '''
|
||||
vars:
|
||||
- name: ansible_oc_context
|
||||
env:
|
||||
- name: k8S_AUTH_CONTEXT
|
||||
- name: K8S_AUTH_CONTEXT
|
||||
oc_host:
|
||||
description:
|
||||
- URL for accessing the API.
|
||||
@@ -147,10 +147,10 @@ DOCUMENTATION = '''
|
||||
aliases: [ oc_verify_ssl ]
|
||||
'''
|
||||
|
||||
from ansible_collections.community.general.plugins.connection.kubectl import Connection as KubectlConnection
|
||||
from ansible_collections.community.kubernetes.plugins.connection.kubectl import Connection as KubectlConnection
|
||||
|
||||
|
||||
CONNECTION_TRANSPORT = 'oc'
|
||||
CONNECTION_TRANSPORT = 'community.general.oc'
|
||||
|
||||
CONNECTION_OPTIONS = {
|
||||
'oc_container': '-c',
|
||||
|
||||
62
plugins/doc_fragments/_gcp.py
Normal file
62
plugins/doc_fragments/_gcp.py
Normal file
@@ -0,0 +1,62 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2018, Google Inc.
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
# GCP doc fragment.
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
project:
|
||||
description:
|
||||
- The Google Cloud Platform project to use.
|
||||
type: str
|
||||
auth_kind:
|
||||
description:
|
||||
- The type of credential used.
|
||||
type: str
|
||||
required: true
|
||||
choices: [ application, machineaccount, serviceaccount ]
|
||||
service_account_contents:
|
||||
description:
|
||||
- The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it.
|
||||
type: jsonarg
|
||||
service_account_file:
|
||||
description:
|
||||
- The path of a Service Account JSON file if serviceaccount is selected as type.
|
||||
type: path
|
||||
service_account_email:
|
||||
description:
|
||||
- An optional service account email address if machineaccount is selected
|
||||
and the user does not wish to use the default email.
|
||||
type: str
|
||||
scopes:
|
||||
description:
|
||||
- Array of scopes to be used.
|
||||
type: list
|
||||
elements: str
|
||||
env_type:
|
||||
description:
|
||||
- Specifies which Ansible environment you're running this module within.
|
||||
- This should not be set unless you know what you're doing.
|
||||
- This only alters the User Agent string for any API requests.
|
||||
type: str
|
||||
notes:
|
||||
- for authentication, you can set service_account_file using the
|
||||
c(gcp_service_account_file) env variable.
|
||||
- for authentication, you can set service_account_contents using the
|
||||
c(GCP_SERVICE_ACCOUNT_CONTENTS) env variable.
|
||||
- For authentication, you can set service_account_email using the
|
||||
C(GCP_SERVICE_ACCOUNT_EMAIL) env variable.
|
||||
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env
|
||||
variable.
|
||||
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
|
||||
- Environment variables values will only be used if the playbook values are
|
||||
not set.
|
||||
- The I(service_account_email) and I(service_account_file) options are
|
||||
mutually exclusive.
|
||||
'''
|
||||
138
plugins/doc_fragments/_netapp.py
Normal file
138
plugins/doc_fragments/_netapp.py
Normal file
@@ -0,0 +1,138 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2018, Sumit Kumar <sumit4@netapp.com>, chris Archibald <carchi@netapp.com>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
- See respective platform section for more details
|
||||
requirements:
|
||||
- See respective platform section for more details
|
||||
notes:
|
||||
- Ansible modules are available for the following NetApp Storage Platforms: E-Series, ONTAP, SolidFire
|
||||
'''
|
||||
|
||||
# Documentation fragment for ONTAP (na_cdot)
|
||||
ONTAP = r'''
|
||||
options:
|
||||
hostname:
|
||||
required: true
|
||||
description:
|
||||
- The hostname or IP address of the ONTAP instance.
|
||||
username:
|
||||
required: true
|
||||
description:
|
||||
- This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.
|
||||
For more information, please read the documentation U(https://mysupport.netapp.com/NOW/download/software/nmsdk/9.4/).
|
||||
aliases: ['user']
|
||||
password:
|
||||
required: true
|
||||
description:
|
||||
- Password for the specified user.
|
||||
aliases: ['pass']
|
||||
requirements:
|
||||
- A physical or virtual clustered Data ONTAP system. The modules were developed with Clustered Data ONTAP 8.3
|
||||
- Ansible 2.2
|
||||
- netapp-lib (2015.9.25). Install using 'pip install netapp-lib'
|
||||
|
||||
notes:
|
||||
- The modules prefixed with na\\_cdot are built to support the ONTAP storage platform.
|
||||
|
||||
'''
|
||||
|
||||
# Documentation fragment for SolidFire
|
||||
SOLIDFIRE = r'''
|
||||
options:
|
||||
hostname:
|
||||
required: true
|
||||
description:
|
||||
- The hostname or IP address of the SolidFire cluster.
|
||||
username:
|
||||
required: true
|
||||
description:
|
||||
- Please ensure that the user has the adequate permissions. For more information, please read the official documentation
|
||||
U(https://mysupport.netapp.com/documentation/docweb/index.html?productID=62636&language=en-US).
|
||||
aliases: ['user']
|
||||
password:
|
||||
required: true
|
||||
description:
|
||||
- Password for the specified user.
|
||||
aliases: ['pass']
|
||||
|
||||
requirements:
|
||||
- The modules were developed with SolidFire 10.1
|
||||
- solidfire-sdk-python (1.1.0.92) or greater. Install using 'pip install solidfire-sdk-python'
|
||||
|
||||
notes:
|
||||
- The modules prefixed with na\\_elementsw are built to support the SolidFire storage platform.
|
||||
|
||||
'''
|
||||
|
||||
# Documentation fragment for ONTAP (na_ontap)
|
||||
NA_ONTAP = r'''
|
||||
options:
|
||||
hostname:
|
||||
description:
|
||||
- The hostname or IP address of the ONTAP instance.
|
||||
type: str
|
||||
required: true
|
||||
username:
|
||||
description:
|
||||
- This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.
|
||||
For more information, please read the documentation U(https://mysupport.netapp.com/NOW/download/software/nmsdk/9.4/).
|
||||
type: str
|
||||
required: true
|
||||
aliases: [ user ]
|
||||
password:
|
||||
description:
|
||||
- Password for the specified user.
|
||||
type: str
|
||||
required: true
|
||||
aliases: [ pass ]
|
||||
https:
|
||||
description:
|
||||
- Enable and disable https
|
||||
type: bool
|
||||
default: no
|
||||
validate_certs:
|
||||
description:
|
||||
- If set to C(no), the SSL certificates will not be validated.
|
||||
- This should only set to C(False) used on personally controlled sites using self-signed certificates.
|
||||
type: bool
|
||||
default: yes
|
||||
http_port:
|
||||
description:
|
||||
- Override the default port (80 or 443) with this port
|
||||
type: int
|
||||
ontapi:
|
||||
description:
|
||||
- The ontap api version to use
|
||||
type: int
|
||||
use_rest:
|
||||
description:
|
||||
- REST API if supported by the target system for all the resources and attributes the module requires. Otherwise will revert to ZAPI.
|
||||
- Always -- will always use the REST API
|
||||
- Never -- will always use the ZAPI
|
||||
- Auto -- will try to use the REST Api
|
||||
default: Auto
|
||||
choices: ['Never', 'Always', 'Auto']
|
||||
type: str
|
||||
|
||||
|
||||
requirements:
|
||||
- A physical or virtual clustered Data ONTAP system. The modules support Data ONTAP 9.1 and onward
|
||||
- Ansible 2.6
|
||||
- Python2 netapp-lib (2017.10.30) or later. Install using 'pip install netapp-lib'
|
||||
- Python3 netapp-lib (2018.11.13) or later. Install using 'pip install netapp-lib'
|
||||
- To enable http on the cluster you must run the following commands 'set -privilege advanced;' 'system services web modify -http-enabled true;'
|
||||
|
||||
notes:
|
||||
- The modules prefixed with na\\_ontap are built to support the ONTAP storage platform.
|
||||
|
||||
'''
|
||||
@@ -1,45 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2016, John Barker <jobarker@redhat.com>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
host:
|
||||
description:
|
||||
- Hostname or IP of the A10 Networks device.
|
||||
type: str
|
||||
required: true
|
||||
username:
|
||||
description:
|
||||
- An account with administrator privileges.
|
||||
type: str
|
||||
required: true
|
||||
aliases: [ admin, user ]
|
||||
password:
|
||||
description:
|
||||
- Password for the C(username) account.
|
||||
type: str
|
||||
required: true
|
||||
aliases: [ pass, pwd ]
|
||||
write_config:
|
||||
description:
|
||||
- If C(yes), any changes will cause a write of the running configuration
|
||||
to non-volatile memory. This will save I(all) configuration changes,
|
||||
including those that may have been made manually or through other modules,
|
||||
so care should be taken when specifying C(yes).
|
||||
type: bool
|
||||
default: no
|
||||
validate_certs:
|
||||
description:
|
||||
- If C(no), SSL certificates will not be validated.
|
||||
- This should only be used on personally controlled devices using self-signed certificates.
|
||||
type: bool
|
||||
default: yes
|
||||
notes:
|
||||
- Requires A10 Networks aXAPI 2.1.
|
||||
'''
|
||||
@@ -1,55 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, James Mighion <@jmighion>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
provider:
|
||||
description:
|
||||
- A dict object containing connection details.
|
||||
suboptions:
|
||||
host:
|
||||
description:
|
||||
- Specifies the DNS host name or address for connecting to the remote device over the specified transport.
|
||||
- The value of host is used as the destination address for the transport.
|
||||
type: str
|
||||
required: true
|
||||
port:
|
||||
description:
|
||||
- Specifies the port to use when building the connection to the remote device.
|
||||
type: int
|
||||
default: 22
|
||||
username:
|
||||
description:
|
||||
- Configures the username to use to authenticate the connection to the remote device.
|
||||
- This value is used to authenticate the SSH session.
|
||||
- If the value is not specified in the task, the value of environment variable
|
||||
C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- Specifies the password to use to authenticate the connection to the remote device.
|
||||
- This value is used to authenticate the SSH session.
|
||||
- If the value is not specified in the task, the value of environment variable
|
||||
C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- Specifies the timeout in seconds for communicating with the network device
|
||||
for either connecting or sending commands.
|
||||
- If the timeout is exceeded before the operation is completed, the module will error.
|
||||
type: int
|
||||
default: 10
|
||||
ssh_keyfile:
|
||||
description:
|
||||
- Specifies the SSH key to use to authenticate the connection to the remote device.
|
||||
- This value is the path to the key used to authenticate the SSH session.
|
||||
- If the value is not specified in the task, the value of environment variable
|
||||
C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
||||
type: path
|
||||
'''
|
||||
@@ -1,8 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017 Alibaba Group Holding Limited. He Guimin <heguimin36@163.com>
|
||||
# Copyright (c) 2017-present Alibaba Group Holding Limited. He Guimin <heguimin36@163.com>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
@@ -11,46 +14,95 @@ class ModuleDocFragment(object):
|
||||
options:
|
||||
alicloud_access_key:
|
||||
description:
|
||||
- Aliyun Cloud access key.
|
||||
- If not set then the value of environment variable C(ALICLOUD_ACCESS_KEY),
|
||||
C(ALICLOUD_ACCESS_KEY_ID) will be used instead.
|
||||
- Alibaba Cloud access key. If not set then the value of environment variable C(ALICLOUD_ACCESS_KEY),
|
||||
C(ALICLOUD_ACCESS_KEY_ID) will be used instead.
|
||||
aliases: ['access_key_id', 'access_key']
|
||||
type: str
|
||||
aliases: [ access_key_id, access_key ]
|
||||
alicloud_secret_key:
|
||||
description:
|
||||
- Aliyun Cloud secret key.
|
||||
- If not set then the value of environment variable C(ALICLOUD_SECRET_KEY),
|
||||
C(ALICLOUD_SECRET_ACCESS_KEY) will be used instead.
|
||||
- Alibaba Cloud secret key. If not set then the value of environment variable C(ALICLOUD_SECRET_KEY),
|
||||
C(ALICLOUD_SECRET_ACCESS_KEY) will be used instead.
|
||||
aliases: ['secret_access_key', 'secret_key']
|
||||
type: str
|
||||
aliases: [ secret_access_key, secret_key ]
|
||||
alicloud_region:
|
||||
description:
|
||||
- The Aliyun Cloud region to use.
|
||||
- If not specified then the value of environment variable
|
||||
C(ALICLOUD_REGION), C(ALICLOUD_REGION_ID) will be used instead.
|
||||
- The Alibaba Cloud region to use. If not specified then the value of environment variable
|
||||
C(ALICLOUD_REGION), C(ALICLOUD_REGION_ID) will be used instead.
|
||||
aliases: ['region', 'region_id']
|
||||
required: true
|
||||
type: str
|
||||
aliases: [ region, region_id ]
|
||||
alicloud_security_token:
|
||||
description:
|
||||
- The Aliyun Cloud security token.
|
||||
- If not specified then the value of environment variable
|
||||
C(ALICLOUD_SECURITY_TOKEN) will be used instead.
|
||||
- The Alibaba Cloud security token. If not specified then the value of environment variable
|
||||
C(ALICLOUD_SECURITY_TOKEN) will be used instead.
|
||||
aliases: ['security_token']
|
||||
type: str
|
||||
alicloud_assume_role:
|
||||
description:
|
||||
- If provided with a role ARN, Ansible will attempt to assume this role using the supplied credentials.
|
||||
- The nested assume_role block supports I(alicloud_assume_role_arn), I(alicloud_assume_role_session_name),
|
||||
I(alicloud_assume_role_session_expiration) and I(alicloud_assume_role_policy)
|
||||
type: dict
|
||||
aliases: ['assume_role']
|
||||
alicloud_assume_role_arn:
|
||||
description:
|
||||
- The Alibaba Cloud role_arn. The ARN of the role to assume. If ARN is set to an empty string,
|
||||
it does not perform role switching. It supports environment variable ALICLOUD_ASSUME_ROLE_ARN.
|
||||
ansible will execute with provided credentials.
|
||||
aliases: ['assume_role_arn']
|
||||
type: str
|
||||
alicloud_assume_role_session_name:
|
||||
description:
|
||||
- The Alibaba Cloud session_name. The session name to use when assuming the role. If omitted,
|
||||
'ansible' is passed to the AssumeRole call as session name. It supports environment variable
|
||||
ALICLOUD_ASSUME_ROLE_SESSION_NAME
|
||||
aliases: ['assume_role_session_name']
|
||||
type: str
|
||||
alicloud_assume_role_session_expiration:
|
||||
description:
|
||||
- The Alibaba Cloud session_expiration. The time after which the established session for assuming
|
||||
role expires. Valid value range 900-3600 seconds. Default to 3600 (in this case Alicloud use own default
|
||||
value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION
|
||||
aliases: ['assume_role_session_expiration']
|
||||
type: int
|
||||
ecs_role_name:
|
||||
description:
|
||||
- The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control'
|
||||
section of the Alibaba Cloud console.
|
||||
- If you're running Ansible from an ECS instance with RAM Instance using RAM Role, Ansible will just access the
|
||||
metadata U(http://100.100.100.200/latest/meta-data/ram/security-credentials/<ecs_role_name>) to obtain the STS
|
||||
credential. This is a preferred approach over any other when running in ECS as you can avoid hard coding
|
||||
credentials. Instead these are leased on-the-fly by Ansible which reduces the chance of leakage.
|
||||
aliases: ['role_name']
|
||||
type: str
|
||||
profile:
|
||||
description:
|
||||
- This is the Alicloud profile name as set in the shared credentials file. It can also be sourced from the
|
||||
ALICLOUD_PROFILE environment variable.
|
||||
type: str
|
||||
shared_credentials_file:
|
||||
description:
|
||||
- This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE
|
||||
environment variable.
|
||||
- If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
|
||||
type: str
|
||||
aliases: [ security_token ]
|
||||
author:
|
||||
- He Guimin (@xiaozhu36)
|
||||
- "He Guimin (@xiaozhu36)"
|
||||
requirements:
|
||||
- python >= 2.6
|
||||
extends_documentation_fragment:
|
||||
- community.general.alicloud
|
||||
|
||||
- "python >= 3.6"
|
||||
notes:
|
||||
- If parameters are not set within the module, the following
|
||||
environment variables can be used in decreasing order of precedence
|
||||
C(ALICLOUD_ACCESS_KEY) or C(ALICLOUD_ACCESS_KEY_ID),
|
||||
C(ALICLOUD_SECRET_KEY) or C(ALICLOUD_SECRET_ACCESS_KEY),
|
||||
C(ALICLOUD_REGION) or C(ALICLOUD_REGION_ID),
|
||||
C(ALICLOUD_SECURITY_TOKEN)
|
||||
C(ALICLOUD_SECURITY_TOKEN),
|
||||
C(ALICLOUD_ECS_ROLE_NAME),
|
||||
C(ALICLOUD_SHARED_CREDENTIALS_FILE),
|
||||
C(ALICLOUD_PROFILE),
|
||||
C(ALICLOUD_ASSUME_ROLE_ARN),
|
||||
C(ALICLOUD_ASSUME_ROLE_SESSION_NAME),
|
||||
C(ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION),
|
||||
- C(ALICLOUD_REGION) or C(ALICLOUD_REGION_ID) can be typically be used to specify the
|
||||
ALICLOUD region, when required, but this can also be configured in the footmark config file
|
||||
'''
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, James Mighion <@jmighion>
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
provider:
|
||||
description:
|
||||
- A dict object containing connection details.
|
||||
suboptions:
|
||||
host:
|
||||
description:
|
||||
- Specifies the DNS host name or address for connecting to the remote
|
||||
device over the specified transport. The value of host is used as
|
||||
the destination address for the transport.
|
||||
type: str
|
||||
required: true
|
||||
port:
|
||||
description:
|
||||
- Specifies the port to use when building the connection to the remote.
|
||||
device.
|
||||
type: int
|
||||
default: 22
|
||||
username:
|
||||
description:
|
||||
- Configures the username to use to authenticate the connection to
|
||||
the remote device. This value is used to authenticate
|
||||
the SSH session. If the value is not specified in the task, the
|
||||
value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- Specifies the password to use to authenticate the connection to
|
||||
the remote device. This value is used to authenticate
|
||||
the SSH session. If the value is not specified in the task, the
|
||||
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- Specifies the timeout in seconds for communicating with the network device
|
||||
for either connecting or sending commands. If the timeout is
|
||||
exceeded before the operation is completed, the module will error.
|
||||
type: int
|
||||
default: 10
|
||||
ssh_keyfile:
|
||||
description:
|
||||
- Specifies the SSH key to use to authenticate the connection to
|
||||
the remote device. This value is the path to the
|
||||
key used to authenticate the SSH session. If the value is not specified
|
||||
in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE)
|
||||
will be used instead.
|
||||
type: path
|
||||
'''
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Created on December 12, 2016
|
||||
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
|
||||
# Avi Version: 16.3.4
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
# Avi common documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
controller:
|
||||
description:
|
||||
- IP address or hostname of the controller. The default value is the environment variable C(AVI_CONTROLLER).
|
||||
type: str
|
||||
default: ''
|
||||
username:
|
||||
description:
|
||||
- Username used for accessing Avi controller. The default value is the environment variable C(AVI_USERNAME).
|
||||
type: str
|
||||
default: ''
|
||||
password:
|
||||
description:
|
||||
- Password of Avi user in Avi controller. The default value is the environment variable C(AVI_PASSWORD).
|
||||
type: str
|
||||
default: ''
|
||||
tenant:
|
||||
description:
|
||||
- Name of tenant used for all Avi API calls and context of object.
|
||||
type: str
|
||||
default: admin
|
||||
tenant_uuid:
|
||||
description:
|
||||
- UUID of tenant used for all Avi API calls and context of object.
|
||||
type: str
|
||||
default: ''
|
||||
api_version:
|
||||
description:
|
||||
- Avi API version of to use for Avi API and objects.
|
||||
type: str
|
||||
default: 16.4.4
|
||||
avi_credentials:
|
||||
description:
|
||||
- Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details.
|
||||
suboptions:
|
||||
controller:
|
||||
description:
|
||||
- Avi controller IP or SQDN
|
||||
username:
|
||||
description:
|
||||
- Avi controller username
|
||||
password:
|
||||
description:
|
||||
- Avi controller password
|
||||
api_version:
|
||||
description:
|
||||
- Avi controller version
|
||||
default: 16.4.4
|
||||
tenant:
|
||||
description:
|
||||
- Avi controller tenant
|
||||
default: admin
|
||||
tenant_uuid:
|
||||
description:
|
||||
- Avi controller tenant UUID
|
||||
port:
|
||||
description:
|
||||
- Avi controller port
|
||||
token:
|
||||
description:
|
||||
- Avi controller API token
|
||||
timeout:
|
||||
description:
|
||||
- Avi controller request timeout
|
||||
default: 300
|
||||
session_id:
|
||||
description:
|
||||
- Avi controller API session id to reuse existing session with csrftoken
|
||||
csrftoken:
|
||||
description:
|
||||
- Avi controller API csrftoken to reuse existing session with session id
|
||||
type: dict
|
||||
api_context:
|
||||
description:
|
||||
- Avi API context that includes current session ID and CSRF Token.
|
||||
- This allows user to perform single login and re-use the session.
|
||||
type: dict
|
||||
avi_disable_session_cache_as_fact:
|
||||
description:
|
||||
- It disables avi session information to be cached as a fact.
|
||||
type: bool
|
||||
|
||||
notes:
|
||||
- For more information on using Ansible to manage Avi Network devices see U(https://www.ansible.com/ansible-avi-networks).
|
||||
'''
|
||||
@@ -1,60 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
provider:
|
||||
description:
|
||||
- A dict object containing connection details.
|
||||
suboptions:
|
||||
host:
|
||||
description:
|
||||
- Specifies the DNS host name or address for connecting to the remote
|
||||
device over the specified transport. The value of host is used as
|
||||
the destination address for the transport.
|
||||
type: str
|
||||
required: true
|
||||
port:
|
||||
description:
|
||||
- Specifies the port to use when building the connection to the remote
|
||||
device. This value applies to either I(cli) or I(netconf). The port
|
||||
value will default to the appropriate transport common port if
|
||||
none is provided in the task. (cli=22, netconf=22).
|
||||
type: int
|
||||
default: 0 (use common port)
|
||||
username:
|
||||
description:
|
||||
- Configures the username to use to authenticate the connection to
|
||||
the remote device. This value is used to authenticate the CLI login.
|
||||
If the value is not specified in the task, the value of environment
|
||||
variable C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- Specifies the password to use to authenticate the connection to
|
||||
the remote device. This is a common argument used for cli
|
||||
transports. If the value is not specified in the task, the
|
||||
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||
type: str
|
||||
ssh_keyfile:
|
||||
description:
|
||||
- Specifies the SSH key to use to authenticate the connection to
|
||||
the remote device. This argument is used for the I(cli)
|
||||
transport. If the value is not specified in the task, the
|
||||
value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
||||
type: path
|
||||
transport:
|
||||
description:
|
||||
- Configures the transport connection to use when connecting to the
|
||||
remote device. The transport argument supports connectivity to the
|
||||
device over cli (ssh).
|
||||
type: str
|
||||
required: true
|
||||
choices: [ cli, netconf ]
|
||||
default: cli
|
||||
'''
|
||||
@@ -1,30 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2019, René Moser <mail@renemoser.net>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard cloudstack documentation fragment
|
||||
DOCUMENTATION = '''
|
||||
options:
|
||||
api_token:
|
||||
description:
|
||||
- cloudscale.ch API token.
|
||||
- This can also be passed in the C(CLOUDSCALE_API_TOKEN) environment variable.
|
||||
type: str
|
||||
api_timeout:
|
||||
description:
|
||||
- Timeout in seconds for calls to the cloudscale.ch API.
|
||||
default: 30
|
||||
type: int
|
||||
notes:
|
||||
- Instead of the api_token parameter the C(CLOUDSCALE_API_TOKEN) environment variable can be used.
|
||||
- All operations are performed using the cloudscale.ch public API v1.
|
||||
- "For details consult the full API documentation: U(https://www.cloudscale.ch/en/api/v1)."
|
||||
- A valid API token is required for all operations. You can create as many tokens as you like using the cloudscale.ch control panel at
|
||||
U(https://control.cloudscale.ch).
|
||||
'''
|
||||
@@ -1,71 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2015, René Moser <mail@renemoser.net>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard cloudstack documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- API key of the CloudStack API.
|
||||
- If not given, the C(CLOUDSTACK_KEY) env variable is considered.
|
||||
- As the last option, the value is taken from the ini config file, also see the notes.
|
||||
type: str
|
||||
api_secret:
|
||||
description:
|
||||
- Secret key of the CloudStack API.
|
||||
- If not set, the C(CLOUDSTACK_SECRET) env variable is considered.
|
||||
- As the last option, the value is taken from the ini config file, also see the notes.
|
||||
type: str
|
||||
api_url:
|
||||
description:
|
||||
- URL of the CloudStack API e.g. https://cloud.example.com/client/api.
|
||||
- If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered.
|
||||
- As the last option, the value is taken from the ini config file, also see the notes.
|
||||
type: str
|
||||
api_http_method:
|
||||
description:
|
||||
- HTTP method used to query the API endpoint.
|
||||
- If not given, the C(CLOUDSTACK_METHOD) env variable is considered.
|
||||
- As the last option, the value is taken from the ini config file, also see the notes.
|
||||
- Fallback value is C(get) if not specified.
|
||||
type: str
|
||||
choices: [ get, post ]
|
||||
api_timeout:
|
||||
description:
|
||||
- HTTP timeout in seconds.
|
||||
- If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered.
|
||||
- As the last option, the value is taken from the ini config file, also see the notes.
|
||||
- Fallback value is 10 seconds if not specified.
|
||||
type: int
|
||||
api_region:
|
||||
description:
|
||||
- Name of the ini section in the C(cloustack.ini) file.
|
||||
- If not given, the C(CLOUDSTACK_REGION) env variable is considered.
|
||||
type: str
|
||||
default: cloudstack
|
||||
requirements:
|
||||
- python >= 2.6
|
||||
- cs >= 0.6.10
|
||||
notes:
|
||||
- Ansible uses the C(cs) library's configuration method if credentials are not
|
||||
provided by the arguments C(api_url), C(api_key), C(api_secret).
|
||||
Configuration is read from several locations, in the following order.
|
||||
The C(CLOUDSTACK_ENDPOINT), C(CLOUDSTACK_KEY), C(CLOUDSTACK_SECRET) and
|
||||
C(CLOUDSTACK_METHOD). C(CLOUDSTACK_TIMEOUT) environment variables.
|
||||
A C(CLOUDSTACK_CONFIG) environment variable pointing to an C(.ini) file.
|
||||
A C(cloudstack.ini) file in the current working directory.
|
||||
A C(.cloudstack.ini) file in the users home directory.
|
||||
Optionally multiple credentials and endpoints can be specified using ini sections in C(cloudstack.ini).
|
||||
Use the argument C(api_region) to select the section name, default section is C(cloudstack).
|
||||
See https://github.com/exoscale/cs for more information.
|
||||
- A detailed guide about cloudstack modules can be found in the L(CloudStack Cloud Guide,../scenario_guides/guide_cloudstack.html).
|
||||
- This module supports check mode.
|
||||
'''
|
||||
@@ -1,78 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, Lenovo, Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
# Standard CNOS documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
outputfile:
|
||||
description:
|
||||
- This specifies the file path where the output of each command
|
||||
execution is saved. Each command that is specified in the merged
|
||||
template file and each response from the device are saved here.
|
||||
Usually the location is the results folder, but you can
|
||||
choose another location based on your write permission.
|
||||
type: str
|
||||
required: true
|
||||
host:
|
||||
description:
|
||||
- This is the variable used to search the hosts file at
|
||||
/etc/ansible/hosts and identify the IP address of the device on
|
||||
which the template is going to be applied. Usually the Ansible
|
||||
keyword {{ inventory_hostname }} is specified in the playbook as
|
||||
an abstraction of the group of network elements that need to be
|
||||
configured.
|
||||
type: str
|
||||
required: true
|
||||
username:
|
||||
description:
|
||||
- Configures the username used to authenticate the connection to
|
||||
the remote device. The value of the username parameter is used to
|
||||
authenticate the SSH session. While generally the value should
|
||||
come from the inventory file, you can also specify it as a
|
||||
variable. This parameter is optional. If it is not specified, no
|
||||
default value will be used.
|
||||
type: str
|
||||
required: true
|
||||
password:
|
||||
description:
|
||||
- Configures the password used to authenticate the connection to
|
||||
the remote device. The value of the password parameter is used to
|
||||
authenticate the SSH session. While generally the value should
|
||||
come from the inventory file, you can also specify it as a
|
||||
variable. This parameter is optional. If it is not specified, no
|
||||
default value will be used.
|
||||
type: str
|
||||
required: true
|
||||
enablePassword:
|
||||
description:
|
||||
- Configures the password used to enter Global Configuration
|
||||
command mode on the switch. If the switch does not request this
|
||||
password, the parameter is ignored.While generally the value
|
||||
should come from the inventory file, you can also specify it as a
|
||||
variable. This parameter is optional. If it is not specified,
|
||||
no default value will be used.
|
||||
type: str
|
||||
deviceType:
|
||||
description:
|
||||
- This specifies the type of device where the method is executed.
|
||||
The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added
|
||||
since Ansible 2.4. The choice NE0152T is added since 2.8
|
||||
type: str
|
||||
required: true
|
||||
choices:
|
||||
- g8272_cnos
|
||||
- g8296_cnos
|
||||
- g8332_cnos
|
||||
- NE0152T
|
||||
- NE1072T
|
||||
- NE1032
|
||||
- NE1032T
|
||||
- NE10032
|
||||
- NE2572
|
||||
notes:
|
||||
- For more information on using Ansible to manage Lenovo Network devices see U(https://www.ansible.com/ansible-lenovo).
|
||||
'''
|
||||
@@ -1,30 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2018, Ansible Project
|
||||
# Copyright: (c) 2018, Abhijeet Kasurde (akasurde@redhat.com)
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
# Parameters for DigitalOcean modules
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
oauth_token:
|
||||
description:
|
||||
- DigitalOcean OAuth token.
|
||||
- "There are several other environment variables which can be used to provide this value."
|
||||
- "i.e., - 'DO_API_TOKEN', 'DO_API_KEY', 'DO_OAUTH_TOKEN' and 'OAUTH_TOKEN'"
|
||||
type: str
|
||||
aliases: [ api_token ]
|
||||
timeout:
|
||||
description:
|
||||
- The timeout in seconds used for polling DigitalOcean's API.
|
||||
type: int
|
||||
default: 30
|
||||
validate_certs:
|
||||
description:
|
||||
- If set to C(no), the SSL certificates will not be validated.
|
||||
- This should only set to C(no) used on personally controlled sites using self-signed certificates.
|
||||
type: bool
|
||||
default: yes
|
||||
'''
|
||||
@@ -3,6 +3,9 @@
|
||||
# Copyright: (c) 2016, Dimension Data
|
||||
# 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
|
||||
|
||||
# Authors:
|
||||
# - Adam Friedman <tintoy@tintoy.io>
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# Copyright: (c) 2016, Dimension Data
|
||||
# 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
|
||||
|
||||
# Authors:
|
||||
# - Adam Friedman <tintoy@tintoy.io>
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ notes:
|
||||
with the product that sets up the environment. It will set these variables for you. See
|
||||
U(https://docs.docker.com/machine/reference/env/) for more details.
|
||||
- When connecting to Docker daemon with TLS, you might need to install additional Python packages.
|
||||
For the Docker SDK for Python, version 2.4 or newer, this can be done by installing C(docker[tls]) with M(pip).
|
||||
For the Docker SDK for Python, version 2.4 or newer, this can be done by installing C(docker[tls]) with M(ansible.builtin.pip).
|
||||
- Note that the Docker SDK for Python only allows to specify the path to the Docker configuration for very few functions.
|
||||
In general, it will use C($HOME/.docker/config.json) if the C(DOCKER_CONFIG) environment variable is not specified,
|
||||
and use C($DOCKER_CONFIG/config.json) otherwise.
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
# Copyright: (c) 2018, Luca Lorenzetto (@remix_tj) <lorenzetto.luca@gmail.com>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, Red Hat Inc.
|
||||
# Copyright: (c) 2017, Lenovo.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
authorize:
|
||||
description:
|
||||
- Instructs the module to enter privileged mode on the remote device
|
||||
before sending any commands. If not specified, the device will
|
||||
attempt to execute all commands in non-privileged mode. If the value
|
||||
is not specified in the task, the value of environment variable
|
||||
C(ANSIBLE_NET_AUTHORIZE) will be used instead.
|
||||
type: bool
|
||||
default: no
|
||||
auth_pass:
|
||||
description:
|
||||
- Specifies the password to use if required to enter privileged mode
|
||||
on the remote device. If I(authorize) is false, then this argument
|
||||
does nothing. If the value is not specified in the task, the value of
|
||||
environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead.
|
||||
provider:
|
||||
description:
|
||||
- A dict object containing connection details.
|
||||
type: dict
|
||||
suboptions:
|
||||
host:
|
||||
description:
|
||||
- Specifies the DNS host name or address for connecting to the remote
|
||||
device over the specified transport. The value of host is used as
|
||||
the destination address for the transport.
|
||||
type: str
|
||||
required: true
|
||||
port:
|
||||
description:
|
||||
- Specifies the port to use when building the connection to the remote device.
|
||||
type: int
|
||||
default: 22
|
||||
username:
|
||||
description:
|
||||
- Configures the username to use to authenticate the connection to
|
||||
the remote device. This value is used to authenticate
|
||||
the SSH session. If the value is not specified in the task, the
|
||||
value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||
type: str
|
||||
password:
|
||||
description:
|
||||
- Specifies the password to use to authenticate the connection to
|
||||
the remote device. This value is used to authenticate
|
||||
the SSH session. If the value is not specified in the task, the
|
||||
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
- Specifies the timeout in seconds for communicating with the network device
|
||||
for either connecting or sending commands. If the timeout is
|
||||
exceeded before the operation is completed, the module will error.
|
||||
type: int
|
||||
default: 10
|
||||
ssh_keyfile:
|
||||
description:
|
||||
- Specifies the SSH key to use to authenticate the connection to
|
||||
the remote device. This value is the path to the
|
||||
key used to authenticate the SSH session. If the value is not specified
|
||||
in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE)
|
||||
will be used instead.
|
||||
type: path
|
||||
authorize:
|
||||
description:
|
||||
- Instructs the module to enter privileged mode on the remote device
|
||||
before sending any commands. If not specified, the device will
|
||||
attempt to execute all commands in non-privileged mode. If the value
|
||||
is not specified in the task, the value of environment variable
|
||||
C(ANSIBLE_NET_AUTHORIZE) will be used instead.
|
||||
type: bool
|
||||
default: no
|
||||
auth_pass:
|
||||
description:
|
||||
- Specifies the password to use if required to enter privileged mode
|
||||
on the remote device. If I(authorize) is false, then this argument
|
||||
does nothing. If the value is not specified in the task, the value of
|
||||
environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead.
|
||||
type: str
|
||||
'''
|
||||
@@ -1,56 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2017, René Moser <mail@renemoser.net>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
# Standard exoscale documentation fragment
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
api_key:
|
||||
description:
|
||||
- API key of the Exoscale DNS API.
|
||||
- Since 2.4, the ENV variable C(CLOUDSTACK_KEY) is used as default, when defined.
|
||||
type: str
|
||||
api_secret:
|
||||
description:
|
||||
- Secret key of the Exoscale DNS API.
|
||||
- Since 2.4, the ENV variable C(CLOUDSTACK_SECRET) is used as default, when defined.
|
||||
type: str
|
||||
api_timeout:
|
||||
description:
|
||||
- HTTP timeout to Exoscale DNS API.
|
||||
- Since 2.4, the ENV variable C(CLOUDSTACK_TIMEOUT) is used as default, when defined.
|
||||
type: int
|
||||
default: 10
|
||||
api_region:
|
||||
description:
|
||||
- Name of the ini section in the C(cloustack.ini) file.
|
||||
- Since 2.4, the ENV variable C(CLOUDSTACK_REGION) is used as default, when defined.
|
||||
type: str
|
||||
default: cloudstack
|
||||
validate_certs:
|
||||
description:
|
||||
- Validate SSL certs of the Exoscale DNS API.
|
||||
type: bool
|
||||
default: yes
|
||||
requirements:
|
||||
- python >= 2.6
|
||||
notes:
|
||||
- As Exoscale DNS uses the same API key and secret for all services, we reuse the config used for Exscale Compute based on CloudStack.
|
||||
The config is read from several locations, in the following order.
|
||||
The C(CLOUDSTACK_KEY), C(CLOUDSTACK_SECRET) environment variables.
|
||||
A C(CLOUDSTACK_CONFIG) environment variable pointing to an C(.ini) file,
|
||||
A C(cloudstack.ini) file in the current working directory.
|
||||
A C(.cloudstack.ini) file in the users home directory.
|
||||
Optionally multiple credentials and endpoints can be specified using ini sections in C(cloudstack.ini).
|
||||
Use the argument C(api_region) to select the section name, default section is C(cloudstack).
|
||||
- This module does not support multiple A records and will complain properly if you try.
|
||||
- More information Exoscale DNS can be found on https://community.exoscale.ch/documentation/dns/.
|
||||
- This module supports check mode and diff.
|
||||
'''
|
||||
@@ -1,59 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2018, Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
# GCP doc fragment.
|
||||
DOCUMENTATION = r'''
|
||||
options:
|
||||
project:
|
||||
description:
|
||||
- The Google Cloud Platform project to use.
|
||||
type: str
|
||||
auth_kind:
|
||||
description:
|
||||
- The type of credential used.
|
||||
type: str
|
||||
required: true
|
||||
choices: [ application, machineaccount, serviceaccount ]
|
||||
service_account_contents:
|
||||
description:
|
||||
- The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it.
|
||||
type: jsonarg
|
||||
service_account_file:
|
||||
description:
|
||||
- The path of a Service Account JSON file if serviceaccount is selected as type.
|
||||
type: path
|
||||
service_account_email:
|
||||
description:
|
||||
- An optional service account email address if machineaccount is selected
|
||||
and the user does not wish to use the default email.
|
||||
type: str
|
||||
scopes:
|
||||
description:
|
||||
- Array of scopes to be used.
|
||||
type: list
|
||||
elements: str
|
||||
env_type:
|
||||
description:
|
||||
- Specifies which Ansible environment you're running this module within.
|
||||
- This should not be set unless you know what you're doing.
|
||||
- This only alters the User Agent string for any API requests.
|
||||
type: str
|
||||
notes:
|
||||
- for authentication, you can set service_account_file using the
|
||||
c(gcp_service_account_file) env variable.
|
||||
- for authentication, you can set service_account_contents using the
|
||||
c(GCP_SERVICE_ACCOUNT_CONTENTS) env variable.
|
||||
- For authentication, you can set service_account_email using the
|
||||
C(GCP_SERVICE_ACCOUNT_EMAIL) env variable.
|
||||
- For authentication, you can set auth_kind using the C(GCP_AUTH_KIND) env
|
||||
variable.
|
||||
- For authentication, you can set scopes using the C(GCP_SCOPES) env variable.
|
||||
- Environment variables values will only be used if the playbook values are
|
||||
not set.
|
||||
- The I(service_account_email) and I(service_account_file) options are
|
||||
mutually exclusive.
|
||||
'''
|
||||
@@ -3,6 +3,9 @@
|
||||
# Copyright: (c) 2019 Felix Fontein <felix@fontein.de>
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# 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
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user