mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Sanity fixes in various modules (#50080)
This commit is contained in:
parent
6caed0c38b
commit
15d39f9108
23 changed files with 372 additions and 340 deletions
|
@ -6,7 +6,7 @@
|
||||||
# still belong to the author of the module, and may assign their own license
|
# still belong to the author of the module, and may assign their own license
|
||||||
# to the complete work.
|
# to the complete work.
|
||||||
#
|
#
|
||||||
# (c) 2017 Red Hat, Inc.
|
# Copyright: (c) 2017, Red Hat Inc.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without modification,
|
# Redistribution and use in source and binary forms, with or without modification,
|
||||||
# are permitted provided that the following conditions are met:
|
# are permitted provided that the following conditions are met:
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||||
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import json
|
import json
|
||||||
|
@ -44,43 +44,43 @@ from ansible.module_utils.urls import fetch_url
|
||||||
_DEVICE_CONNECTION = None
|
_DEVICE_CONNECTION = None
|
||||||
|
|
||||||
nxos_provider_spec = {
|
nxos_provider_spec = {
|
||||||
'host': dict(),
|
'host': dict(type='str'),
|
||||||
'port': dict(type='int'),
|
'port': dict(type='int'),
|
||||||
|
|
||||||
'username': dict(fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])),
|
'username': dict(type='str', fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])),
|
||||||
'password': dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True),
|
'password': dict(type='str', no_log=True, fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD'])),
|
||||||
'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE'])),
|
'ssh_keyfile': dict(type='str', fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE'])),
|
||||||
|
|
||||||
'authorize': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE']), type='bool'),
|
'authorize': dict(type='bool', fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE'])),
|
||||||
'auth_pass': dict(no_log=True, fallback=(env_fallback, ['ANSIBLE_NET_AUTH_PASS'])),
|
'auth_pass': dict(type='str', no_log=True, fallback=(env_fallback, ['ANSIBLE_NET_AUTH_PASS'])),
|
||||||
|
|
||||||
'use_ssl': dict(type='bool'),
|
'use_ssl': dict(type='bool'),
|
||||||
'use_proxy': dict(default=True, type='bool'),
|
'use_proxy': dict(type='bool', default=True),
|
||||||
'validate_certs': dict(type='bool'),
|
'validate_certs': dict(type='bool'),
|
||||||
|
|
||||||
'timeout': dict(type='int'),
|
'timeout': dict(type='int'),
|
||||||
|
|
||||||
'transport': dict(default='cli', choices=['cli', 'nxapi'])
|
'transport': dict(type='str', default='cli', choices=['cli', 'nxapi'])
|
||||||
}
|
}
|
||||||
nxos_argument_spec = {
|
nxos_argument_spec = {
|
||||||
'provider': dict(type='dict', options=nxos_provider_spec),
|
'provider': dict(type='dict', options=nxos_provider_spec),
|
||||||
}
|
}
|
||||||
nxos_top_spec = {
|
nxos_top_spec = {
|
||||||
'host': dict(removed_in_version=2.9),
|
'host': dict(type='str', removed_in_version=2.9),
|
||||||
'port': dict(removed_in_version=2.9, type='int'),
|
'port': dict(type='int', removed_in_version=2.9),
|
||||||
|
|
||||||
'username': dict(removed_in_version=2.9),
|
'username': dict(type='str', removed_in_version=2.9),
|
||||||
'password': dict(removed_in_version=2.9, no_log=True),
|
'password': dict(type='str', no_log=True, removed_in_version=2.9),
|
||||||
'ssh_keyfile': dict(removed_in_version=2.9),
|
'ssh_keyfile': dict(type='str', removed_in_version=2.9),
|
||||||
|
|
||||||
'authorize': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE']), type='bool'),
|
'authorize': dict(type='bool', fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE'])),
|
||||||
'auth_pass': dict(removed_in_version=2.9, no_log=True),
|
'auth_pass': dict(type='str', no_log=True, removed_in_version=2.9),
|
||||||
|
|
||||||
'use_ssl': dict(removed_in_version=2.9, type='bool'),
|
'use_ssl': dict(type='bool', removed_in_version=2.9),
|
||||||
'validate_certs': dict(removed_in_version=2.9, type='bool'),
|
'validate_certs': dict(type='bool', removed_in_version=2.9),
|
||||||
'timeout': dict(removed_in_version=2.9, type='int'),
|
'timeout': dict(type='int', removed_in_version=2.9),
|
||||||
|
|
||||||
'transport': dict(removed_in_version=2.9, choices=['cli', 'nxapi'])
|
'transport': dict(type='str', choices=['cli', 'nxapi'], removed_in_version=2.9)
|
||||||
}
|
}
|
||||||
nxos_argument_spec.update(nxos_top_spec)
|
nxos_argument_spec.update(nxos_top_spec)
|
||||||
|
|
||||||
|
|
|
@ -1180,16 +1180,16 @@ def url_argument_spec():
|
||||||
that will be requesting content via urllib/urllib2
|
that will be requesting content via urllib/urllib2
|
||||||
'''
|
'''
|
||||||
return dict(
|
return dict(
|
||||||
url=dict(),
|
url=dict(type='str'),
|
||||||
force=dict(default='no', aliases=['thirsty'], type='bool'),
|
force=dict(type='bool', default=False, aliases=['thirsty']),
|
||||||
http_agent=dict(default='ansible-httpget'),
|
http_agent=dict(type='str', default='ansible-httpget'),
|
||||||
use_proxy=dict(default='yes', type='bool'),
|
use_proxy=dict(type='bool', default=True),
|
||||||
validate_certs=dict(default='yes', type='bool'),
|
validate_certs=dict(type='bool', default=True),
|
||||||
url_username=dict(required=False),
|
url_username=dict(type='str'),
|
||||||
url_password=dict(required=False, no_log=True),
|
url_password=dict(type='str', no_log=True),
|
||||||
force_basic_auth=dict(required=False, type='bool', default='no'),
|
force_basic_auth=dict(type='bool', default=False),
|
||||||
client_cert=dict(required=False, type='path', default=None),
|
client_cert=dict(type='path'),
|
||||||
client_key=dict(required=False, type='path', default=None),
|
client_key=dict(type='path'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ class AzureRMRedisCaches(AzureRMModuleBase):
|
||||||
type='int'
|
type='int'
|
||||||
),
|
),
|
||||||
shard_count=dict(
|
shard_count=dict(
|
||||||
type='ints'
|
type='int'
|
||||||
),
|
),
|
||||||
static_ip=dict(
|
static_ip=dict(
|
||||||
type='str'
|
type='str'
|
||||||
|
|
|
@ -24,26 +24,27 @@ version_added: "2.8"
|
||||||
author: Antoine Barbare (@abarbare)
|
author: Antoine Barbare (@abarbare)
|
||||||
description:
|
description:
|
||||||
- This module manages Security Group on Scaleway account
|
- This module manages Security Group on Scaleway account
|
||||||
U(https://developer.scaleway.com)
|
U(https://developer.scaleway.com).
|
||||||
extends_documentation_fragment: scaleway
|
extends_documentation_fragment: scaleway
|
||||||
|
|
||||||
options:
|
options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Indicate desired state of the Security Group.
|
- Indicate desired state of the Security Group.
|
||||||
|
type: str
|
||||||
|
choices: [ absent, present ]
|
||||||
default: present
|
default: present
|
||||||
choices:
|
|
||||||
- present
|
|
||||||
- absent
|
|
||||||
|
|
||||||
organization:
|
organization:
|
||||||
description:
|
description:
|
||||||
- Organization identifier
|
- Organization identifier.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
region:
|
region:
|
||||||
description:
|
description:
|
||||||
- Scaleway region to use (for example C(par1)).
|
- Scaleway region to use (for example C(par1)).
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
choices:
|
choices:
|
||||||
- ams1
|
- ams1
|
||||||
|
@ -53,37 +54,37 @@ options:
|
||||||
|
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the Security Group
|
- Name of the Security Group.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
description:
|
description:
|
||||||
description:
|
description:
|
||||||
- Description of the Security Group
|
- Description of the Security Group.
|
||||||
|
type: str
|
||||||
|
|
||||||
stateful:
|
stateful:
|
||||||
description:
|
description:
|
||||||
- Create a stateful security group which allows established connections in and out
|
- Create a stateful security group which allows established connections in and out.
|
||||||
required: true
|
|
||||||
type: bool
|
type: bool
|
||||||
|
required: true
|
||||||
|
|
||||||
inbound_default_policy:
|
inbound_default_policy:
|
||||||
description:
|
description:
|
||||||
- Default policy for incoming trafic
|
- Default policy for incoming trafic.
|
||||||
choices:
|
type: str
|
||||||
- accept
|
choices: [ accept, drop ]
|
||||||
- drop
|
|
||||||
|
|
||||||
outbound_default_policy:
|
outbound_default_policy:
|
||||||
description:
|
description:
|
||||||
- Default policy for outcoming trafic
|
- Default policy for outcoming trafic.
|
||||||
choices:
|
type: str
|
||||||
- accept
|
choices: [ accept, drop ]
|
||||||
- drop
|
|
||||||
|
|
||||||
organization_default:
|
organization_default:
|
||||||
type: bool
|
|
||||||
description:
|
description:
|
||||||
- Create security group to be the default one
|
- Create security group to be the default one.
|
||||||
|
type: bool
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -215,15 +216,15 @@ def core(module):
|
||||||
def main():
|
def main():
|
||||||
argument_spec = scaleway_argument_spec()
|
argument_spec = scaleway_argument_spec()
|
||||||
argument_spec.update(dict(
|
argument_spec.update(dict(
|
||||||
state=dict(default='present', choices=['absent', 'present']),
|
state=dict(type='str', default='present', choices=['absent', 'present']),
|
||||||
organization=dict(required=True),
|
organization=dict(type='str', required=True),
|
||||||
name=dict(required=True),
|
name=dict(type='str', required=True),
|
||||||
description=dict(),
|
description=dict(type='str'),
|
||||||
region=dict(required=True, choices=SCALEWAY_LOCATION.keys()),
|
region=dict(type='str', required=True, choices=SCALEWAY_LOCATION.keys()),
|
||||||
stateful=dict(required=True, type=bool),
|
stateful=dict(type='bool', required=True),
|
||||||
inbound_default_policy=dict(choices=['accept', 'drop']),
|
inbound_default_policy=dict(type='str', choices=['accept', 'drop']),
|
||||||
outbound_default_policy=dict(choices=['accept', 'drop']),
|
outbound_default_policy=dict(type='str', choices=['accept', 'drop']),
|
||||||
organization_default=dict(type=bool),
|
organization_default=dict(type='bool'),
|
||||||
))
|
))
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=argument_spec,
|
argument_spec=argument_spec,
|
||||||
|
|
|
@ -36,8 +36,8 @@ options:
|
||||||
description:
|
description:
|
||||||
- Enable, disable, or reset the SNMP agent.
|
- Enable, disable, or reset the SNMP agent.
|
||||||
type: str
|
type: str
|
||||||
choices: [ enabled, disabled, reset ]
|
choices: [ disabled, enabled, reset ]
|
||||||
default: 'disabled'
|
default: disabled
|
||||||
community:
|
community:
|
||||||
description:
|
description:
|
||||||
- List of SNMP community strings.
|
- List of SNMP community strings.
|
||||||
|
@ -54,10 +54,10 @@ options:
|
||||||
default: []
|
default: []
|
||||||
trap_filter:
|
trap_filter:
|
||||||
description:
|
description:
|
||||||
- Comma separated list of trap oids for traps not to be sent by agent.
|
- A list of trap oids for traps not to be sent by agent,
|
||||||
- E.g. [ 1.3.6.1.4.1.6876.4.1.1.0, 1.3.6.1.4.1.6876.4.1.1.1 ]
|
e.g. [ 1.3.6.1.4.1.6876.4.1.1.0, 1.3.6.1.4.1.6876.4.1.1.1 ]
|
||||||
- Use value C(reset) to clear settings.
|
- Use value C(reset) to clear settings.
|
||||||
type: str
|
type: list
|
||||||
send_trap:
|
send_trap:
|
||||||
description:
|
description:
|
||||||
- Send a test trap to validate the configuration.
|
- Send a test trap to validate the configuration.
|
||||||
|
@ -69,13 +69,13 @@ options:
|
||||||
- The embedded SNMP agent receives hardware events either from IPMI sensors C(sensors) or CIM indications C(indications).
|
- The embedded SNMP agent receives hardware events either from IPMI sensors C(sensors) or CIM indications C(indications).
|
||||||
type: str
|
type: str
|
||||||
choices: [ indications, sensors ]
|
choices: [ indications, sensors ]
|
||||||
default: 'indications'
|
default: indications
|
||||||
log_level:
|
log_level:
|
||||||
description:
|
description:
|
||||||
- Syslog logging level.
|
- Syslog logging level.
|
||||||
type: str
|
type: str
|
||||||
choices: [ debug, info, warning, error ]
|
choices: [ debug, info, warning, error ]
|
||||||
default: 'info'
|
default: info
|
||||||
extends_documentation_fragment: vmware.documentation
|
extends_documentation_fragment: vmware.documentation
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -468,13 +468,13 @@ def main():
|
||||||
"""Main"""
|
"""Main"""
|
||||||
argument_spec = vmware_argument_spec()
|
argument_spec = vmware_argument_spec()
|
||||||
argument_spec.update(
|
argument_spec.update(
|
||||||
state=dict(default='disabled', choices=['enabled', 'disabled', 'reset']),
|
state=dict(type='str', default='disabled', choices=['enabled', 'disabled', 'reset']),
|
||||||
snmp_port=dict(type='int', default=161),
|
snmp_port=dict(type='int', default=161),
|
||||||
community=dict(type='list', default=[]),
|
community=dict(type='list', default=[]),
|
||||||
trap_targets=dict(type='list', default=list(), required=False),
|
trap_targets=dict(type='list', default=list()),
|
||||||
trap_filter=dict(type='list', required=False),
|
trap_filter=dict(type='list'),
|
||||||
hw_source=dict(default='indications', choices=['indications', 'sensors']),
|
hw_source=dict(type='str', default='indications', choices=['indications', 'sensors']),
|
||||||
log_level=dict(default='info', choices=['debug', 'info', 'warning', 'error']),
|
log_level=dict(type='str', default='info', choices=['debug', 'info', 'warning', 'error']),
|
||||||
send_trap=dict(type='bool', default=False),
|
send_trap=dict(type='bool', default=False),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- The timeout in seconds to wait when receiving the initial SMB negotiate
|
- The timeout in seconds to wait when receiving the initial SMB negotiate
|
||||||
response from the server.
|
response from the server.
|
||||||
type: str
|
type: int
|
||||||
default: 60
|
default: 60
|
||||||
executable:
|
executable:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -14,7 +14,7 @@ ANSIBLE_METADATA = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
---
|
---
|
||||||
module: postgresql_idx
|
module: postgresql_idx
|
||||||
short_description: Creates or drops indexes from a PostgreSQL database.
|
short_description: Creates or drops indexes from a PostgreSQL database.
|
||||||
|
@ -25,27 +25,34 @@ options:
|
||||||
idxname:
|
idxname:
|
||||||
description:
|
description:
|
||||||
- Name of the index to create or drop.
|
- Name of the index to create or drop.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
db:
|
db:
|
||||||
description:
|
description:
|
||||||
- Name of database where the index will be created/dropped.
|
- Name of database where the index will be created/dropped.
|
||||||
|
type: str
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- Database port to connect.
|
- Database port to connect.
|
||||||
|
type: int
|
||||||
default: 5432
|
default: 5432
|
||||||
login_user:
|
login_user:
|
||||||
description:
|
description:
|
||||||
- User (role) used to authenticate with PostgreSQL.
|
- User (role) used to authenticate with PostgreSQL.
|
||||||
|
type: str
|
||||||
default: postgres
|
default: postgres
|
||||||
login_password:
|
login_password:
|
||||||
description:
|
description:
|
||||||
- Password used to authenticate with PostgreSQL.
|
- Password used to authenticate with PostgreSQL.
|
||||||
|
type: str
|
||||||
login_host:
|
login_host:
|
||||||
description:
|
description:
|
||||||
- Host running PostgreSQL.
|
- Host running PostgreSQL.
|
||||||
|
type: str
|
||||||
login_unix_socket:
|
login_unix_socket:
|
||||||
description:
|
description:
|
||||||
- Path to a Unix domain socket for local connections.
|
- Path to a Unix domain socket for local connections.
|
||||||
|
type: str
|
||||||
ssl_mode:
|
ssl_mode:
|
||||||
description:
|
description:
|
||||||
- Determines whether or with what priority a secure SSL TCP/IP connection
|
- Determines whether or with what priority a secure SSL TCP/IP connection
|
||||||
|
@ -53,36 +60,43 @@ options:
|
||||||
- See U(https://www.postgresql.org/docs/current/static/libpq-ssl.html) for
|
- See U(https://www.postgresql.org/docs/current/static/libpq-ssl.html) for
|
||||||
more information on the modes.
|
more information on the modes.
|
||||||
- Default of C(prefer) matches libpq default.
|
- Default of C(prefer) matches libpq default.
|
||||||
|
type: str
|
||||||
default: prefer
|
default: prefer
|
||||||
choices: ["disable", "allow", "prefer", "require", "verify-ca", "verify-full"]
|
choices: [ allow, disable, prefer, require, verify-ca, verify-full ]
|
||||||
ssl_rootcert:
|
ssl_rootcert:
|
||||||
description:
|
description:
|
||||||
- Specifies the name of a file containing SSL certificate authority (CA)
|
- Specifies the name of a file containing SSL certificate authority (CA)
|
||||||
certificate(s). If the file exists, the server's certificate will be
|
certificate(s). If the file exists, the server's certificate will be
|
||||||
verified to be signed by one of these authorities.
|
verified to be signed by one of these authorities.
|
||||||
|
type: str
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Index state.
|
- Index state.
|
||||||
|
type: str
|
||||||
default: present
|
default: present
|
||||||
choices: ["present", "absent"]
|
choices: ["present", "absent"]
|
||||||
table:
|
table:
|
||||||
description:
|
description:
|
||||||
- Table to create index on it.
|
- Table to create index on it.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
columns:
|
columns:
|
||||||
description:
|
description:
|
||||||
- List of index columns.
|
- List of index columns.
|
||||||
|
type: str
|
||||||
cond:
|
cond:
|
||||||
description:
|
description:
|
||||||
- Index conditions.
|
- Index conditions.
|
||||||
|
type: str
|
||||||
idxtype:
|
idxtype:
|
||||||
description:
|
description:
|
||||||
- Index type (like btree, gist, gin, etc.).
|
- Index type (like btree, gist, gin, etc.).
|
||||||
|
type: str
|
||||||
concurrent:
|
concurrent:
|
||||||
description:
|
description:
|
||||||
- Enable or disable concurrent mode (CREATE / DROP INDEX CONCURRENTLY).
|
- Enable or disable concurrent mode (CREATE / DROP INDEX CONCURRENTLY).
|
||||||
default: yes
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: yes
|
||||||
notes:
|
notes:
|
||||||
- The default authentication assumes that you are either logging in as or
|
- The default authentication assumes that you are either logging in as or
|
||||||
sudo'ing to the postgres account on the host.
|
sudo'ing to the postgres account on the host.
|
||||||
|
@ -266,17 +280,17 @@ def index_drop(cursor, module, idxname, concurrent=True):
|
||||||
def main():
|
def main():
|
||||||
argument_spec = pgutils.postgres_common_argument_spec()
|
argument_spec = pgutils.postgres_common_argument_spec()
|
||||||
argument_spec.update(dict(
|
argument_spec.update(dict(
|
||||||
idxname=dict(required=True, aliases=['idxname']),
|
idxname=dict(type='str', required=True, aliases=['idxname']),
|
||||||
db=dict(default=''),
|
db=dict(type='str', default=''),
|
||||||
ssl_mode=dict(default='prefer', choices=[
|
ssl_mode=dict(type='str', default='prefer', choices=[
|
||||||
'disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full']),
|
'allow', 'disable', 'prefer', 'require', 'verify-ca', 'verify-full']),
|
||||||
ssl_rootcert=dict(default=None),
|
ssl_rootcert=dict(type='str'),
|
||||||
state=dict(default="present", choices=["absent", "present"]),
|
state=dict(type='str', default="present", choices=["absent", "present"]),
|
||||||
concurrent=dict(type=bool, default="yes"),
|
concurrent=dict(type='bool', default=True),
|
||||||
table=dict(default=None),
|
table=dict(type='str'),
|
||||||
idxtype=dict(default=None),
|
idxtype=dict(type='str'),
|
||||||
columns=dict(default=None),
|
columns=dict(type='str'),
|
||||||
cond=dict(default=None)
|
cond=dict(type='str')
|
||||||
))
|
))
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=argument_spec,
|
argument_spec=argument_spec,
|
||||||
|
|
|
@ -15,111 +15,115 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
DOCUMENTATION = r'''
|
DOCUMENTATION = r'''
|
||||||
---
|
---
|
||||||
module: copy
|
module: copy
|
||||||
version_added: "historical"
|
version_added: historical
|
||||||
short_description: Copies files to remote locations
|
short_description: Copy files to remote locations
|
||||||
description:
|
description:
|
||||||
- The C(copy) module copies a file from the local or remote machine to a location on the remote machine.
|
- The C(copy) module copies a file from the local or remote machine to a location on the remote machine.
|
||||||
Use the M(fetch) module to copy files from remote locations to the local box.
|
- Use the M(fetch) module to copy files from remote locations to the local box.
|
||||||
If you need variable interpolation in copied files, use the M(template) module.
|
- If you need variable interpolation in copied files, use the M(template) module.
|
||||||
- For Windows targets, use the M(win_copy) module instead.
|
- For Windows targets, use the M(win_copy) module instead.
|
||||||
options:
|
options:
|
||||||
src:
|
src:
|
||||||
description:
|
description:
|
||||||
- Local path to a file to copy to the remote server; can be absolute or relative.
|
- Local path to a file to copy to the remote server.
|
||||||
If path is a directory, it is copied recursively. In this case, if path ends
|
- This can be absolute or relative.
|
||||||
with "/", only inside contents of that directory are copied to destination.
|
- If path is a directory, it is copied recursively. In this case, if path ends
|
||||||
Otherwise, if it does not end with "/", the directory itself with all contents
|
with "/", only inside contents of that directory are copied to destination.
|
||||||
is copied. This behavior is similar to Rsync.
|
Otherwise, if it does not end with "/", the directory itself with all contents
|
||||||
|
is copied. This behavior is similar to the C(rsync) command line tool.
|
||||||
content:
|
content:
|
||||||
description:
|
description:
|
||||||
- When used instead of I(src), sets the contents of a file directly to the specified value.
|
- When used instead of I(src), sets the contents of a file directly to the specified value.
|
||||||
For anything advanced or with formatting also look at the template module.
|
- For anything advanced or with formatting also look at the template module.
|
||||||
version_added: "1.1"
|
version_added: '1.1'
|
||||||
dest:
|
dest:
|
||||||
description:
|
description:
|
||||||
- 'Remote absolute path where the file should be copied to. If I(src) is a directory, this must be a directory too.
|
- Remote absolute path where the file should be copied to.
|
||||||
If I(dest) is a nonexistent path and if either I(dest) ends with "/" or I(src) is a directory, I(dest) is created.
|
- If I(src) is a directory, this must be a directory too.
|
||||||
If I(src) and I(dest) are files, the parent directory of I(dest) isn''t created: the task fails if it doesn''t already exist.'
|
- If I(dest) is a non-existent path and if either I(dest) ends with "/" or I(src) is a directory, I(dest) is created.
|
||||||
|
- If I(src) and I(dest) are files, the parent directory of I(dest) is not created and the task fails if it does not already exist.
|
||||||
required: yes
|
required: yes
|
||||||
backup:
|
backup:
|
||||||
description:
|
description:
|
||||||
- Create a backup file including the timestamp information so you can get
|
- Create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly.
|
||||||
the original file back if you somehow clobbered it incorrectly.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: no
|
||||||
version_added: "0.7"
|
version_added: '0.7'
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- the default is C(yes), which will replace the remote file when contents
|
- Influence whether the remote file must always be replaced.
|
||||||
are different than the source. If C(no), the file will only be transferred
|
- If C(yes), the remote file will be replaced when contents are different than the source.
|
||||||
if the destination does not exist.
|
- If C(no), the file will only be transferred if the destination does not exist.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'yes'
|
default: yes
|
||||||
aliases: [ thirsty ]
|
aliases: [ thirsty ]
|
||||||
version_added: "1.1"
|
version_added: '1.1'
|
||||||
mode:
|
mode:
|
||||||
description:
|
description:
|
||||||
- "Mode the file or directory should be. For those used to I(/usr/bin/chmod) remember that
|
- The permissions of the destination file or directory.
|
||||||
modes are actually octal numbers. You must either add a leading zero so that Ansible's
|
- For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers.
|
||||||
YAML parser knows it is an octal number (like C(0644) or C(01777)) or quote it
|
You must either add a leading zero so that Ansible's YAML parser knows it is an octal number
|
||||||
(like C('644') or C('1777')) so Ansible receives a string and can do its own conversion from
|
(like C(0644) or C(01777))or quote it (like C('644') or C('1777')) so Ansible receives a string
|
||||||
string into number. Giving Ansible a number without following one of these rules will end
|
and can do its own conversion from string into number. Giving Ansible a number without following
|
||||||
up with a decimal number which will have unexpected results. As of version 1.8, the mode
|
one of these rules will end up with a decimal number which will have unexpected results.
|
||||||
may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)). As of
|
- As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, C(u+rwx) or C(u=rw,g=r,o=r)).
|
||||||
version 2.3, the mode may also be the special string C(preserve). C(preserve) means that
|
- As of Ansible 2.3, the mode may also be the special string C(preserve).
|
||||||
the file will be given the same permissions as the source file."
|
- C(preserve) means that the file will be given the same permissions as the source file.
|
||||||
directory_mode:
|
directory_mode:
|
||||||
description:
|
description:
|
||||||
- When doing a recursive copy set the mode for the directories. If this is not set we will use the system
|
- When doing a recursive copy set the mode for the directories.
|
||||||
defaults. The mode is only set on directories which are newly created, and will not affect those that
|
- If this is not set we will use the system defaults.
|
||||||
already existed.
|
- The mode is only set on directories which are newly created, and will not affect those that already existed.
|
||||||
version_added: "1.5"
|
version_added: '1.5'
|
||||||
remote_src:
|
remote_src:
|
||||||
description:
|
description:
|
||||||
- If C(no), it will search for I(src) at originating/master machine.
|
- Influence whether I(src) needs to be transferred or already is present remotely.
|
||||||
- If C(yes) it will go to the remote/target machine for the I(src). Default is C(no).
|
- If C(no), it will search for I(src) at originating/master machine.
|
||||||
- I(remote_src) supports recursive copying as of version 2.8.
|
- If C(yes) it will go to the remote/target machine for the I(src).
|
||||||
- I(remote_src) only works with C(mode=preserve) as of version 2.6.
|
- I(remote_src) supports recursive copying as of version 2.8.
|
||||||
|
- I(remote_src) only works with C(mode=preserve) as of version 2.6.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: no
|
||||||
version_added: "2.0"
|
version_added: '2.0'
|
||||||
follow:
|
follow:
|
||||||
description:
|
description:
|
||||||
- This flag indicates that filesystem links in the destination, if they exist, should be followed.
|
- This flag indicates that filesystem links in the destination, if they exist, should be followed.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: no
|
||||||
version_added: "1.8"
|
version_added: '1.8'
|
||||||
local_follow:
|
local_follow:
|
||||||
description:
|
description:
|
||||||
- This flag indicates that filesystem links in the source tree, if they exist, should be followed.
|
- This flag indicates that filesystem links in the source tree, if they exist, should be followed.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'yes'
|
default: yes
|
||||||
version_added: "2.4"
|
version_added: '2.4'
|
||||||
checksum:
|
checksum:
|
||||||
description:
|
description:
|
||||||
- SHA1 checksum of the file being transferred. Used to validate that the copy of the file was successful.
|
- SHA1 checksum of the file being transferred.
|
||||||
- If this is not provided, ansible will use the local calculated checksum of the src file.
|
- Used to validate that the copy of the file was successful.
|
||||||
|
- If this is not provided, ansible will use the local calculated checksum of the src file.
|
||||||
version_added: '2.5'
|
version_added: '2.5'
|
||||||
extends_documentation_fragment:
|
extends_documentation_fragment:
|
||||||
- files
|
- decrypt
|
||||||
- validate
|
- files
|
||||||
- decrypt
|
- validate
|
||||||
notes:
|
notes:
|
||||||
- The M(copy) module recursively copy facility does not scale to lots (>hundreds) of files.
|
- The M(copy) module recursively copy facility does not scale to lots (>hundreds) of files.
|
||||||
For alternative, see M(synchronize) module, which is a wrapper around C(rsync).
|
- For alternative, see M(synchronize) module, which is a wrapper around the C(rsync) command line tool.
|
||||||
- For Windows targets, use the M(win_copy) module instead.
|
- For Windows targets, use the M(win_copy) module instead.
|
||||||
seealso:
|
seealso:
|
||||||
- module: assemble
|
- module: assemble
|
||||||
|
- module: fetch
|
||||||
- module: file
|
- module: file
|
||||||
- module: template
|
- module: template
|
||||||
- module: win_copy
|
- module: win_copy
|
||||||
author:
|
author:
|
||||||
- Ansible Core Team
|
- Ansible Core Team
|
||||||
- Michael DeHaan
|
- Michael DeHaan
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
- name: example copying file with owner and permissions
|
- name: Copy file with owner and permissions
|
||||||
copy:
|
copy:
|
||||||
src: /srv/myfiles/foo.conf
|
src: /srv/myfiles/foo.conf
|
||||||
dest: /etc/foo.conf
|
dest: /etc/foo.conf
|
||||||
|
@ -127,7 +131,7 @@ EXAMPLES = r'''
|
||||||
group: foo
|
group: foo
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: The same example as above, but using a symbolic mode equivalent to 0644
|
- name: Copy file with owner and permission, using symbolic representation
|
||||||
copy:
|
copy:
|
||||||
src: /srv/myfiles/foo.conf
|
src: /srv/myfiles/foo.conf
|
||||||
dest: /etc/foo.conf
|
dest: /etc/foo.conf
|
||||||
|
@ -165,7 +169,7 @@ EXAMPLES = r'''
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
validate: /usr/sbin/visudo -cf %s
|
validate: /usr/sbin/visudo -cf %s
|
||||||
|
|
||||||
- name: Copy using the 'content' for inline data
|
- name: Copy using inline content
|
||||||
copy:
|
copy:
|
||||||
content: '# This file was moved to /etc/other.conf'
|
content: '# This file was moved to /etc/other.conf'
|
||||||
dest: /etc/mine.conf
|
dest: /etc/mine.conf
|
||||||
|
@ -185,62 +189,62 @@ EXAMPLES = r'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
dest:
|
dest:
|
||||||
description: destination file/path
|
description: Destination file/path
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: /path/to/file.txt
|
sample: /path/to/file.txt
|
||||||
src:
|
src:
|
||||||
description: source file used for the copy on the target machine
|
description: Source file used for the copy on the target machine
|
||||||
returned: changed
|
returned: changed
|
||||||
type: string
|
type: string
|
||||||
sample: /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source
|
sample: /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source
|
||||||
md5sum:
|
md5sum:
|
||||||
description: md5 checksum of the file after running copy
|
description: MD5 checksum of the file after running copy
|
||||||
returned: when supported
|
returned: when supported
|
||||||
type: string
|
type: string
|
||||||
sample: 2a5aeecc61dc98c4d780b14b330e3282
|
sample: 2a5aeecc61dc98c4d780b14b330e3282
|
||||||
checksum:
|
checksum:
|
||||||
description: sha1 checksum of the file after running copy
|
description: SHA1 checksum of the file after running copy
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: 6e642bb8dd5c2e027bf21dd923337cbb4214f827
|
sample: 6e642bb8dd5c2e027bf21dd923337cbb4214f827
|
||||||
backup_file:
|
backup_file:
|
||||||
description: name of backup file created
|
description: Name of backup file created
|
||||||
returned: changed and if backup=yes
|
returned: changed and if backup=yes
|
||||||
type: string
|
type: string
|
||||||
sample: /path/to/file.txt.2015-02-12@22:09~
|
sample: /path/to/file.txt.2015-02-12@22:09~
|
||||||
gid:
|
gid:
|
||||||
description: group id of the file, after execution
|
description: Group id of the file, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
sample: 100
|
sample: 100
|
||||||
group:
|
group:
|
||||||
description: group of the file, after execution
|
description: Group of the file, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: httpd
|
sample: httpd
|
||||||
owner:
|
owner:
|
||||||
description: owner of the file, after execution
|
description: Owner of the file, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: httpd
|
sample: httpd
|
||||||
uid:
|
uid:
|
||||||
description: owner id of the file, after execution
|
description: Owner id of the file, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
sample: 100
|
sample: 100
|
||||||
mode:
|
mode:
|
||||||
description: permissions of the target, after execution
|
description: Permissions of the target, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: 0644
|
sample: 0644
|
||||||
size:
|
size:
|
||||||
description: size of the target, after execution
|
description: Size of the target, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: int
|
type: int
|
||||||
sample: 1220
|
sample: 1220
|
||||||
state:
|
state:
|
||||||
description: state of the target, after execution
|
description: State of the target, after execution
|
||||||
returned: success
|
returned: success
|
||||||
type: string
|
type: string
|
||||||
sample: file
|
sample: file
|
||||||
|
|
|
@ -24,7 +24,7 @@ options:
|
||||||
path:
|
path:
|
||||||
description:
|
description:
|
||||||
- The CSV filename to read data from.
|
- The CSV filename to read data from.
|
||||||
type: str
|
type: path
|
||||||
required: yes
|
required: yes
|
||||||
aliases: [ filename ]
|
aliases: [ filename ]
|
||||||
key:
|
key:
|
||||||
|
|
|
@ -441,12 +441,12 @@ def format_output(module, path, st):
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
path=dict(required=True, type='path'),
|
path=dict(type='path', required=True),
|
||||||
follow=dict(type='bool', default='no'),
|
follow=dict(type='bool', default=False),
|
||||||
get_md5=dict(type='bool'),
|
get_md5=dict(type='bool'),
|
||||||
get_checksum=dict(type='bool', default='yes'),
|
get_checksum=dict(type='bool', default=True),
|
||||||
get_mime=dict(type='bool', default='yes', aliases=['mime', 'mime_type', 'mime-type']),
|
get_mime=dict(type='bool', default='yes', aliases=['mime', 'mime_type', 'mime-type']),
|
||||||
get_attributes=dict(type='bool', default='yes', aliases=['attr', 'attributes']),
|
get_attributes=dict(type='bool', default=True, aliases=['attr', 'attributes']),
|
||||||
checksum_algorithm=dict(type='str', default='sha1',
|
checksum_algorithm=dict(type='str', default='sha1',
|
||||||
choices=['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'],
|
choices=['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'],
|
||||||
aliases=['checksum', 'checksum_algo']),
|
aliases=['checksum', 'checksum_algo']),
|
||||||
|
|
|
@ -20,7 +20,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
---
|
---
|
||||||
module: ce_aaa_server
|
module: ce_aaa_server
|
||||||
version_added: "2.4"
|
version_added: "2.4"
|
||||||
|
@ -33,51 +33,62 @@ options:
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Specify desired state of the resource.
|
- Specify desired state of the resource.
|
||||||
|
type: str
|
||||||
|
choices: [ absent, present ]
|
||||||
default: present
|
default: present
|
||||||
choices: ['present', 'absent']
|
|
||||||
authen_scheme_name:
|
authen_scheme_name:
|
||||||
description:
|
description:
|
||||||
- Name of an authentication scheme.
|
- Name of an authentication scheme.
|
||||||
The value is a string of 1 to 32 characters.
|
The value is a string of 1 to 32 characters.
|
||||||
|
type: str
|
||||||
first_authen_mode:
|
first_authen_mode:
|
||||||
description:
|
description:
|
||||||
- Preferred authentication mode.
|
- Preferred authentication mode.
|
||||||
|
type: str
|
||||||
choices: ['invalid', 'local', 'hwtacacs', 'radius', 'none']
|
choices: ['invalid', 'local', 'hwtacacs', 'radius', 'none']
|
||||||
author_scheme_name:
|
author_scheme_name:
|
||||||
description:
|
description:
|
||||||
- Name of an authorization scheme.
|
- Name of an authorization scheme.
|
||||||
The value is a string of 1 to 32 characters.
|
The value is a string of 1 to 32 characters.
|
||||||
|
type: str
|
||||||
first_author_mode:
|
first_author_mode:
|
||||||
description:
|
description:
|
||||||
- Preferred authorization mode.
|
- Preferred authorization mode.
|
||||||
|
type: str
|
||||||
choices: ['invalid', 'local', 'hwtacacs', 'if-authenticated', 'none']
|
choices: ['invalid', 'local', 'hwtacacs', 'if-authenticated', 'none']
|
||||||
acct_scheme_name:
|
acct_scheme_name:
|
||||||
description:
|
description:
|
||||||
- Accounting scheme name.
|
- Accounting scheme name.
|
||||||
The value is a string of 1 to 32 characters.
|
The value is a string of 1 to 32 characters.
|
||||||
|
type: str
|
||||||
accounting_mode:
|
accounting_mode:
|
||||||
description:
|
description:
|
||||||
- Accounting Mode.
|
- Accounting Mode.
|
||||||
|
type: str
|
||||||
choices: ['invalid', 'hwtacacs', 'radius', 'none']
|
choices: ['invalid', 'hwtacacs', 'radius', 'none']
|
||||||
domain_name:
|
domain_name:
|
||||||
description:
|
description:
|
||||||
- Name of a domain.
|
- Name of a domain.
|
||||||
The value is a string of 1 to 64 characters.
|
The value is a string of 1 to 64 characters.
|
||||||
|
type: str
|
||||||
radius_server_group:
|
radius_server_group:
|
||||||
description:
|
description:
|
||||||
- RADIUS server group's name.
|
- RADIUS server group's name.
|
||||||
The value is a string of 1 to 32 case-insensitive characters.
|
The value is a string of 1 to 32 case-insensitive characters.
|
||||||
|
type: str
|
||||||
hwtacas_template:
|
hwtacas_template:
|
||||||
description:
|
description:
|
||||||
- Name of a HWTACACS template.
|
- Name of a HWTACACS template.
|
||||||
The value is a string of 1 to 32 case-insensitive characters.
|
The value is a string of 1 to 32 case-insensitive characters.
|
||||||
|
type: str
|
||||||
local_user_group:
|
local_user_group:
|
||||||
description:
|
description:
|
||||||
- Name of the user group where the user belongs. The user inherits all the rights of the user group.
|
- Name of the user group where the user belongs. The user inherits all the rights of the user group.
|
||||||
The value is a string of 1 to 32 characters.
|
The value is a string of 1 to 32 characters.
|
||||||
|
type: str
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r'''
|
||||||
|
|
||||||
- name: AAA server test
|
- name: AAA server test
|
||||||
hosts: cloudengine
|
hosts: cloudengine
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
|
|
||||||
# Copyright (c) 2017 Dell Inc.
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
|
# Copyright: (c) 2017, Dell Inc.
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# 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
|
from __future__ import absolute_import, division, print_function
|
||||||
|
@ -35,6 +36,7 @@ options:
|
||||||
is returned. If the I(wait_for) argument is provided, the
|
is returned. If the I(wait_for) argument is provided, the
|
||||||
module is not returned until the condition is satisfied or
|
module is not returned until the condition is satisfied or
|
||||||
the number of retries has expired.
|
the number of retries has expired.
|
||||||
|
type: list
|
||||||
required: true
|
required: true
|
||||||
wait_for:
|
wait_for:
|
||||||
description:
|
description:
|
||||||
|
@ -43,6 +45,7 @@ options:
|
||||||
before moving forward. If the conditional is not true
|
before moving forward. If the conditional is not true
|
||||||
within the configured number of I(retries), the task fails.
|
within the configured number of I(retries), the task fails.
|
||||||
See examples.
|
See examples.
|
||||||
|
type: list
|
||||||
version_added: "2.2"
|
version_added: "2.2"
|
||||||
match:
|
match:
|
||||||
description:
|
description:
|
||||||
|
@ -52,8 +55,9 @@ options:
|
||||||
then all conditionals in the wait_for must be satisfied. If
|
then all conditionals in the wait_for must be satisfied. If
|
||||||
the value is set to C(any) then only one of the values must be
|
the value is set to C(any) then only one of the values must be
|
||||||
satisfied.
|
satisfied.
|
||||||
|
type: str
|
||||||
default: all
|
default: all
|
||||||
choices: ['any', 'all']
|
choices: [ all, any ]
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
retries:
|
retries:
|
||||||
description:
|
description:
|
||||||
|
@ -61,6 +65,7 @@ options:
|
||||||
before it is considered failed. The command is run on the
|
before it is considered failed. The command is run on the
|
||||||
target device every retry and evaluated against the
|
target device every retry and evaluated against the
|
||||||
I(wait_for) conditions.
|
I(wait_for) conditions.
|
||||||
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
interval:
|
interval:
|
||||||
description:
|
description:
|
||||||
|
@ -68,6 +73,7 @@ options:
|
||||||
of the command. If the command does not pass the specified
|
of the command. If the command does not pass the specified
|
||||||
conditions, the interval indicates how long to wait before
|
conditions, the interval indicates how long to wait before
|
||||||
trying the command again.
|
trying the command again.
|
||||||
|
type: int
|
||||||
default: 1
|
default: 1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
|
|
||||||
# Copyright (c) 2016 Dell Inc.
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
|
# Copyright: (c) 2016, Dell Inc.
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# 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
|
from __future__ import absolute_import, division, print_function
|
||||||
|
@ -34,6 +35,7 @@ options:
|
||||||
is returned. If the I(wait_for) argument is provided, the
|
is returned. If the I(wait_for) argument is provided, the
|
||||||
module is not returned until the condition is satisfied or
|
module is not returned until the condition is satisfied or
|
||||||
the number of retries has expired.
|
the number of retries has expired.
|
||||||
|
type: list
|
||||||
required: true
|
required: true
|
||||||
wait_for:
|
wait_for:
|
||||||
description:
|
description:
|
||||||
|
@ -42,6 +44,7 @@ options:
|
||||||
before moving forward. If the conditional is not true
|
before moving forward. If the conditional is not true
|
||||||
within the configured number of I(retries), the task fails.
|
within the configured number of I(retries), the task fails.
|
||||||
See examples.
|
See examples.
|
||||||
|
type: list
|
||||||
version_added: "2.2"
|
version_added: "2.2"
|
||||||
match:
|
match:
|
||||||
description:
|
description:
|
||||||
|
@ -51,8 +54,9 @@ options:
|
||||||
then all conditionals in the wait_for must be satisfied. If
|
then all conditionals in the wait_for must be satisfied. If
|
||||||
the value is set to C(any) then only one of the values must be
|
the value is set to C(any) then only one of the values must be
|
||||||
satisfied.
|
satisfied.
|
||||||
|
type: str
|
||||||
default: all
|
default: all
|
||||||
choices: ['any', 'all']
|
choices: [ all, any ]
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
retries:
|
retries:
|
||||||
description:
|
description:
|
||||||
|
@ -60,6 +64,7 @@ options:
|
||||||
before it is considered failed. The command is run on the
|
before it is considered failed. The command is run on the
|
||||||
target device every retry and evaluated against the
|
target device every retry and evaluated against the
|
||||||
I(wait_for) conditions.
|
I(wait_for) conditions.
|
||||||
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
interval:
|
interval:
|
||||||
description:
|
description:
|
||||||
|
@ -67,6 +72,7 @@ options:
|
||||||
of the command. If the command does not pass the specified
|
of the command. If the command does not pass the specified
|
||||||
conditions, the interval indicates how long to wait before
|
conditions, the interval indicates how long to wait before
|
||||||
trying the command again.
|
trying the command again.
|
||||||
|
type: int
|
||||||
default: 1
|
default: 1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
|
|
||||||
# Copyright (c) 2016 Dell Inc.
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
|
# Copyright: (c) 2016, Dell Inc.
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# 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
|
from __future__ import absolute_import, division, print_function
|
||||||
__metaclass__ = type
|
__metaclass__ = type
|
||||||
|
|
||||||
|
@ -34,6 +36,7 @@ options:
|
||||||
is returned. If the I(wait_for) argument is provided, the
|
is returned. If the I(wait_for) argument is provided, the
|
||||||
module is not returned until the condition is satisfied or
|
module is not returned until the condition is satisfied or
|
||||||
the number of retries has expired.
|
the number of retries has expired.
|
||||||
|
type: list
|
||||||
required: true
|
required: true
|
||||||
wait_for:
|
wait_for:
|
||||||
description:
|
description:
|
||||||
|
@ -42,6 +45,7 @@ options:
|
||||||
before moving forward. If the conditional is not true
|
before moving forward. If the conditional is not true
|
||||||
within the configured number of I(retries), the task fails.
|
within the configured number of I(retries), the task fails.
|
||||||
See examples.
|
See examples.
|
||||||
|
type: list
|
||||||
version_added: "2.2"
|
version_added: "2.2"
|
||||||
match:
|
match:
|
||||||
description:
|
description:
|
||||||
|
@ -51,8 +55,9 @@ options:
|
||||||
then all conditionals in the wait_for must be satisfied. If
|
then all conditionals in the wait_for must be satisfied. If
|
||||||
the value is set to C(any) then only one of the values must be
|
the value is set to C(any) then only one of the values must be
|
||||||
satisfied.
|
satisfied.
|
||||||
|
type: str
|
||||||
default: all
|
default: all
|
||||||
choices: ['any', 'all']
|
choices: [ all, any ]
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
retries:
|
retries:
|
||||||
description:
|
description:
|
||||||
|
@ -60,6 +65,7 @@ options:
|
||||||
before it is considered failed. The command is run on the
|
before it is considered failed. The command is run on the
|
||||||
target device every retry and evaluated against the
|
target device every retry and evaluated against the
|
||||||
I(wait_for) conditions.
|
I(wait_for) conditions.
|
||||||
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
interval:
|
interval:
|
||||||
description:
|
description:
|
||||||
|
@ -67,6 +73,7 @@ options:
|
||||||
of the command. If the command does not pass the specified
|
of the command. If the command does not pass the specified
|
||||||
conditions, the interval indicates how long to wait before
|
conditions, the interval indicates how long to wait before
|
||||||
trying the command again.
|
trying the command again.
|
||||||
|
type: int
|
||||||
default: 1
|
default: 1
|
||||||
|
|
||||||
notes:
|
notes:
|
||||||
|
|
|
@ -19,7 +19,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|
||||||
DOCUMENTATION = """
|
DOCUMENTATION = r'''
|
||||||
---
|
---
|
||||||
module: dellemc_idrac_firmware
|
module: dellemc_idrac_firmware
|
||||||
short_description: Firmware update from a repository on a network share (CIFS, NFS).
|
short_description: Firmware update from a repository on a network share (CIFS, NFS).
|
||||||
|
@ -32,42 +32,45 @@ description:
|
||||||
- This feature is available only with iDRAC Enterprise License.
|
- This feature is available only with iDRAC Enterprise License.
|
||||||
options:
|
options:
|
||||||
idrac_ip:
|
idrac_ip:
|
||||||
required: True
|
|
||||||
description: iDRAC IP Address.
|
description: iDRAC IP Address.
|
||||||
|
type: str
|
||||||
|
required: True
|
||||||
idrac_user:
|
idrac_user:
|
||||||
required: True
|
|
||||||
description: iDRAC username.
|
description: iDRAC username.
|
||||||
idrac_pwd:
|
type: str
|
||||||
required: True
|
required: True
|
||||||
|
idrac_pwd:
|
||||||
description: iDRAC user password.
|
description: iDRAC user password.
|
||||||
|
type: str
|
||||||
|
required: True
|
||||||
idrac_port:
|
idrac_port:
|
||||||
required: False
|
|
||||||
description: iDRAC port.
|
description: iDRAC port.
|
||||||
|
type: int
|
||||||
default: 443
|
default: 443
|
||||||
share_name:
|
share_name:
|
||||||
required: True
|
|
||||||
description: CIFS or NFS Network share.
|
description: CIFS or NFS Network share.
|
||||||
|
type: str
|
||||||
|
required: True
|
||||||
share_user:
|
share_user:
|
||||||
required: False
|
|
||||||
description: Network share user in the format 'user@domain' or 'domain\\user' if user is
|
description: Network share user in the format 'user@domain' or 'domain\\user' if user is
|
||||||
part of a domain else 'user'. This option is mandatory for CIFS Network Share.
|
part of a domain else 'user'. This option is mandatory for CIFS Network Share.
|
||||||
|
type: str
|
||||||
share_pwd:
|
share_pwd:
|
||||||
required: False
|
|
||||||
description: Network share user password. This option is mandatory for CIFS Network Share.
|
description: Network share user password. This option is mandatory for CIFS Network Share.
|
||||||
|
type: str
|
||||||
share_mnt:
|
share_mnt:
|
||||||
required: True
|
|
||||||
description: Local mount path of the network share with read-write permission for ansible user.
|
description: Local mount path of the network share with read-write permission for ansible user.
|
||||||
This option is mandatory for Network Share.
|
This option is mandatory for Network Share.
|
||||||
|
type: str
|
||||||
|
required: True
|
||||||
reboot:
|
reboot:
|
||||||
required: False
|
|
||||||
description: Whether to reboots after applying the updates or not.
|
description: Whether to reboots after applying the updates or not.
|
||||||
default: False
|
|
||||||
type: bool
|
type: bool
|
||||||
|
default: false
|
||||||
job_wait:
|
job_wait:
|
||||||
required: False
|
|
||||||
description: Whether to wait for job completion or not.
|
description: Whether to wait for job completion or not.
|
||||||
type: bool
|
type: bool
|
||||||
default: True
|
default: true
|
||||||
catalog_file_name:
|
catalog_file_name:
|
||||||
required: False
|
required: False
|
||||||
description: Catalog file name relative to the I(share_name).
|
description: Catalog file name relative to the I(share_name).
|
||||||
|
@ -78,7 +81,7 @@ requirements:
|
||||||
- "omsdk"
|
- "omsdk"
|
||||||
- "python >= 2.7.5"
|
- "python >= 2.7.5"
|
||||||
author: "Rajeev Arakkal (@rajeevarakkal)"
|
author: "Rajeev Arakkal (@rajeevarakkal)"
|
||||||
"""
|
'''
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
---
|
---
|
||||||
|
@ -176,19 +179,19 @@ def update_firmware(idrac, module):
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec={
|
argument_spec={
|
||||||
"idrac_ip": {"required": True, "type": str},
|
"idrac_ip": {"required": True, "type": 'str'},
|
||||||
"idrac_user": {"required": True, "type": str},
|
"idrac_user": {"required": True, "type": 'str'},
|
||||||
"idrac_pwd": {"required": True, "type": str, "no_log": True},
|
"idrac_pwd": {"required": True, "type": 'str', "no_log": True},
|
||||||
"idrac_port": {"required": False, "default": 443, "type": int},
|
"idrac_port": {"required": False, "default": 443, "type": 'int'},
|
||||||
|
|
||||||
"share_name": {"required": True, "type": str},
|
"share_name": {"required": True, "type": 'str'},
|
||||||
"share_user": {"required": False, "type": str},
|
"share_user": {"required": False, "type": 'str'},
|
||||||
"share_pwd": {"required": False, "type": str, "no_log": True},
|
"share_pwd": {"required": False, "type": 'str', "no_log": True},
|
||||||
"share_mnt": {"required": True, "type": str},
|
"share_mnt": {"required": True, "type": 'str'},
|
||||||
|
|
||||||
"catalog_file_name": {"required": False, "type": str, "default": "Catalog.xml"},
|
"catalog_file_name": {"required": False, "type": 'str', "default": "Catalog.xml"},
|
||||||
"reboot": {"required": False, "type": bool, "default": False},
|
"reboot": {"required": False, "type": 'bool', "default": False},
|
||||||
"job_wait": {"required": False, "type": bool, "default": True},
|
"job_wait": {"required": False, "type": 'bool', "default": True},
|
||||||
},
|
},
|
||||||
|
|
||||||
supports_check_mode=False)
|
supports_check_mode=False)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# (c) 2013, Adam Miller (maxamillion@fedoraproject.org)
|
# Copyright: (c) 2013, Adam Miller <maxamillion@fedoraproject.org>
|
||||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# 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
|
from __future__ import absolute_import, division, print_function
|
||||||
|
@ -13,7 +13,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = r'''
|
||||||
---
|
---
|
||||||
module: firewalld
|
module: firewalld
|
||||||
short_description: Manage arbitrary ports/services with firewalld
|
short_description: Manage arbitrary ports/services with firewalld
|
||||||
|
@ -23,36 +23,46 @@ version_added: "1.4"
|
||||||
options:
|
options:
|
||||||
service:
|
service:
|
||||||
description:
|
description:
|
||||||
- "Name of a service to add/remove to/from firewalld - service must be listed in output of firewall-cmd --get-services."
|
- Name of a service to add/remove to/from firewalld.
|
||||||
|
- The service must be listed in output of firewall-cmd --get-services.
|
||||||
|
type: str
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- "Name of a port or port range to add/remove to/from firewalld. Must be in the form PORT/PROTOCOL or PORT-PORT/PROTOCOL for port ranges."
|
- Name of a port or port range to add/remove to/from firewalld.
|
||||||
|
- Must be in the form PORT/PROTOCOL or PORT-PORT/PROTOCOL for port ranges.
|
||||||
|
type: str
|
||||||
rich_rule:
|
rich_rule:
|
||||||
description:
|
description:
|
||||||
- "Rich rule to add/remove to/from firewalld."
|
- Rich rule to add/remove to/from firewalld.
|
||||||
|
type: str
|
||||||
source:
|
source:
|
||||||
description:
|
description:
|
||||||
- 'The source/network you would like to add/remove to/from firewalld'
|
- The source/network you would like to add/remove to/from firewalld.
|
||||||
|
type: str
|
||||||
version_added: "2.0"
|
version_added: "2.0"
|
||||||
interface:
|
interface:
|
||||||
description:
|
description:
|
||||||
- 'The interface you would like to add/remove to/from a zone in firewalld'
|
- The interface you would like to add/remove to/from a zone in firewalld.
|
||||||
|
type: str
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
icmp_block:
|
icmp_block:
|
||||||
description:
|
description:
|
||||||
- 'The icmp block you would like to add/remove to/from a zone in firewalld'
|
- The icmp block you would like to add/remove to/from a zone in firewalld.
|
||||||
|
type: str
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
icmp_block_inversion:
|
icmp_block_inversion:
|
||||||
description:
|
description:
|
||||||
- 'Enable/Disable inversion of icmp blocks for a zone in firewalld'
|
- Enable/Disable inversion of icmp blocks for a zone in firewalld.
|
||||||
|
type: str
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
zone:
|
zone:
|
||||||
description:
|
description:
|
||||||
- >
|
- >
|
||||||
The firewalld zone to add/remove to/from (NOTE: default zone can be configured per system but "public" is default from upstream. Available choices
|
The firewalld zone to add/remove to/from (NOTE: default zone can be configured per system but "public" is default from upstream.
|
||||||
can be extended based on per-system configs, listed here are "out of the box" defaults).
|
- Available choices can be extended based on per-system configs, listed here are "out of the box" defaults).
|
||||||
|
- Possible values include C(block), C(dmz), C(drop), C(external), C(home), C(internal), C(public), C(trusted), C(work) ]
|
||||||
|
type: str
|
||||||
default: system-default(public)
|
default: system-default(public)
|
||||||
choices: [ "work", "drop", "internal", "external", "trusted", "home", "dmz", "public", "block" ]
|
|
||||||
permanent:
|
permanent:
|
||||||
description:
|
description:
|
||||||
- >
|
- >
|
||||||
|
@ -61,26 +71,33 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
immediate:
|
immediate:
|
||||||
description:
|
description:
|
||||||
- "Should this configuration be applied immediately, if set as permanent"
|
- Should this configuration be applied immediately, if set as permanent.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: no
|
||||||
version_added: "1.9"
|
version_added: "1.9"
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- >
|
- Enable or disable a setting.
|
||||||
Enable or disable a setting.
|
- 'For ports: Should this port accept(enabled) or reject(disabled) connections.'
|
||||||
For ports: Should this port accept(enabled) or reject(disabled) connections.
|
- The states C(present) and C(absent) can only be used in zone level operations (i.e. when no other parameters but zone and state are set).
|
||||||
The states "present" and "absent" can only be used in zone level operations (i.e. when no other parameters but zone and state are set).
|
type: str
|
||||||
required: true
|
required: true
|
||||||
choices: [ "enabled", "disabled", "present", "absent" ]
|
choices: [ absent, disabled, enabled, present ]
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
- "The amount of time the rule should be in effect for when non-permanent."
|
- The amount of time the rule should be in effect for when non-permanent.
|
||||||
|
type: int
|
||||||
default: 0
|
default: 0
|
||||||
masquerade:
|
masquerade:
|
||||||
description:
|
description:
|
||||||
- 'The masquerade setting you would like to enable/disable to/from zones within firewalld'
|
- The masquerade setting you would like to enable/disable to/from zones within firewalld.
|
||||||
|
type: str
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
|
offline:
|
||||||
|
description:
|
||||||
|
- Whether to run this module even when firewalld is offline.
|
||||||
|
type: bool
|
||||||
|
version_added: "2.3"
|
||||||
notes:
|
notes:
|
||||||
- Not tested on any Debian based system.
|
- Not tested on any Debian based system.
|
||||||
- Requires the python2 bindings of firewalld, which may not be installed by default.
|
- Requires the python2 bindings of firewalld, which may not be installed by default.
|
||||||
|
@ -96,7 +113,7 @@ requirements: [ 'firewalld >= 0.2.11' ]
|
||||||
author: "Adam Miller (@maxamillion)"
|
author: "Adam Miller (@maxamillion)"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = r'''
|
||||||
- firewalld:
|
- firewalld:
|
||||||
service: https
|
service: https
|
||||||
permanent: yes
|
permanent: yes
|
||||||
|
@ -119,7 +136,7 @@ EXAMPLES = '''
|
||||||
state: enabled
|
state: enabled
|
||||||
|
|
||||||
- firewalld:
|
- firewalld:
|
||||||
rich_rule: 'rule service name="ftp" audit limit value="1/m" accept'
|
rich_rule: rule service name="ftp" audit limit value="1/m" accept
|
||||||
permanent: yes
|
permanent: yes
|
||||||
state: enabled
|
state: enabled
|
||||||
|
|
||||||
|
@ -159,14 +176,11 @@ EXAMPLES = '''
|
||||||
|
|
||||||
- name: Redirect port 443 to 8443 with Rich Rule
|
- name: Redirect port 443 to 8443 with Rich Rule
|
||||||
firewalld:
|
firewalld:
|
||||||
rich_rule: rule family={{ item }} forward-port port=443 protocol=tcp to-port=8443
|
rich_rule: rule forward-port port=443 protocol=tcp to-port=8443
|
||||||
zone: public
|
zone: public
|
||||||
permanent: yes
|
permanent: yes
|
||||||
immediate: yes
|
immediate: yes
|
||||||
state: enabled
|
state: enabled
|
||||||
loop:
|
|
||||||
- ipv4
|
|
||||||
- ipv6
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
@ -618,20 +632,20 @@ def main():
|
||||||
|
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
icmp_block=dict(required=False, default=None),
|
icmp_block=dict(type='str'),
|
||||||
icmp_block_inversion=dict(required=False, default=None),
|
icmp_block_inversion=dict(type='str'),
|
||||||
service=dict(required=False, default=None),
|
service=dict(type='str'),
|
||||||
port=dict(required=False, default=None),
|
port=dict(type='str'),
|
||||||
rich_rule=dict(required=False, default=None),
|
rich_rule=dict(type='str'),
|
||||||
zone=dict(required=False, default=None),
|
zone=dict(type='str'),
|
||||||
immediate=dict(type='bool', default=False),
|
immediate=dict(type='bool', default=False),
|
||||||
source=dict(required=False, default=None),
|
source=dict(type='str'),
|
||||||
permanent=dict(type='bool', required=False, default=None),
|
permanent=dict(type='bool'),
|
||||||
state=dict(choices=['enabled', 'disabled', 'present', 'absent'], required=True),
|
state=dict(type='str', required=True, choices=['absent', 'disabled', 'enabled', 'present']),
|
||||||
timeout=dict(type='int', required=False, default=0),
|
timeout=dict(type='int', default=0),
|
||||||
interface=dict(required=False, default=None),
|
interface=dict(type='str'),
|
||||||
masquerade=dict(required=False, default=None),
|
masquerade=dict(type='str'),
|
||||||
offline=dict(type='bool', required=False, default=None),
|
offline=dict(type='bool'),
|
||||||
),
|
),
|
||||||
supports_check_mode=True
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
|
|
@ -27,31 +27,34 @@ options:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- Hostname or IP of the A10 Networks device.
|
- Hostname or IP of the A10 Networks device.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- An account with administrator privileges.
|
- An account with administrator privileges.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
aliases: ['user', 'admin']
|
aliases: [ admin, user ]
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password for the C(username) account.
|
- Password for the C(username) account.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
aliases: ['pass', 'pwd']
|
aliases: [ pass, pwd ]
|
||||||
write_config:
|
write_config:
|
||||||
description:
|
description:
|
||||||
- If C(yes), any changes will cause a write of the running configuration
|
- If C(yes), any changes will cause a write of the running configuration
|
||||||
to non-volatile memory. This will save I(all) configuration changes,
|
to non-volatile memory. This will save I(all) configuration changes,
|
||||||
including those that may have been made manually or through other modules,
|
including those that may have been made manually or through other modules,
|
||||||
so care should be taken when specifying C(yes).
|
so care should be taken when specifying C(yes).
|
||||||
version_added: 2.2
|
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: no
|
||||||
|
version_added: 2.2
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If C(no), SSL certificates will not be validated. This should only be used
|
- If C(no), SSL certificates will not be validated. This should only be used
|
||||||
on personally controlled devices using self-signed certificates.
|
on personally controlled devices using self-signed certificates.
|
||||||
version_added: 2.2
|
|
||||||
type: bool
|
type: bool
|
||||||
default: 'yes'
|
default: yes
|
||||||
|
version_added: 2.2
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -1,22 +1,8 @@
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
|
||||||
#
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
# Copyright (c) 2016 Dell Inc.
|
# Copyright: (c) 2016, Dell Inc.
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
|
|
|
@ -1,22 +1,8 @@
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
|
||||||
#
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
# Copyright (c) 2016 Dell Inc.
|
# Copyright: (c) 2016, Dell Inc.
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
|
@ -33,32 +19,38 @@ options:
|
||||||
- Specifies the DNS host name or address for connecting to the remote
|
- Specifies the DNS host name or address for connecting to the remote
|
||||||
device over the specified transport. The value of host is used as
|
device over the specified transport. The value of host is used as
|
||||||
the destination address for the transport.
|
the destination address for the transport.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- Specifies the port to use when building the connection to the remote
|
- Specifies the port to use when building the connection to the remote
|
||||||
device.
|
device.
|
||||||
|
type: int
|
||||||
default: 22
|
default: 22
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- User to authenticate the SSH session to the remote device. If the
|
- User to authenticate the SSH session to the remote device. If the
|
||||||
value is not specified in the task, the value of environment variable
|
value is not specified in the task, the value of environment variable
|
||||||
C(ANSIBLE_NET_USERNAME) will be used instead.
|
C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||||
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password to authenticate the SSH session to the remote device. If the
|
- Password to authenticate the SSH session to the remote device. If the
|
||||||
value is not specified in the task, the value of environment variable
|
value is not specified in the task, the value of environment variable
|
||||||
C(ANSIBLE_NET_PASSWORD) will be used instead.
|
C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||||
|
type: str
|
||||||
ssh_keyfile:
|
ssh_keyfile:
|
||||||
description:
|
description:
|
||||||
- Path to an ssh key used to authenticate the SSH session to the remote
|
- Path to an ssh key used to authenticate the SSH session to the remote
|
||||||
device. If the value is not specified in the task, the value of
|
device. If the value is not specified in the task, the value of
|
||||||
environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
||||||
|
type: str
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
- Specifies idle timeout (in seconds) for the connection. Useful if the
|
- Specifies idle timeout (in seconds) for the connection. Useful if the
|
||||||
console freezes before continuing. For example when saving
|
console freezes before continuing. For example when saving
|
||||||
configurations.
|
configurations.
|
||||||
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
notes:
|
notes:
|
||||||
- For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking).
|
- For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking).
|
||||||
|
|
|
@ -1,22 +1,8 @@
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
|
||||||
#
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
# Copyright (c) 2016 Dell Inc.
|
# Copyright: (c) 2016, Dell Inc.
|
||||||
#
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
|
@ -27,38 +13,45 @@ options:
|
||||||
provider:
|
provider:
|
||||||
description:
|
description:
|
||||||
- A dict object containing connection details.
|
- A dict object containing connection details.
|
||||||
|
type: dict
|
||||||
suboptions:
|
suboptions:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- Specifies the DNS host name or address for connecting to the remote
|
- Specifies the DNS host name or address for connecting to the remote
|
||||||
device over the specified transport. The value of host is used as
|
device over the specified transport. The value of host is used as
|
||||||
the destination address for the transport.
|
the destination address for the transport.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
- Specifies the port to use when building the connection to the remote
|
- Specifies the port to use when building the connection to the remote
|
||||||
device.
|
device.
|
||||||
|
type: int
|
||||||
default: 22
|
default: 22
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
- User to authenticate the SSH session to the remote device. If the
|
- User to authenticate the SSH session to the remote device. If the
|
||||||
value is not specified in the task, the value of environment variable
|
value is not specified in the task, the value of environment variable
|
||||||
C(ANSIBLE_NET_USERNAME) will be used instead.
|
C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||||
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Password to authenticate the SSH session to the remote device. If the
|
- Password to authenticate the SSH session to the remote device. If the
|
||||||
value is not specified in the task, the value of environment variable
|
value is not specified in the task, the value of environment variable
|
||||||
C(ANSIBLE_NET_PASSWORD) will be used instead.
|
C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||||
|
type: str
|
||||||
ssh_keyfile:
|
ssh_keyfile:
|
||||||
description:
|
description:
|
||||||
- Path to an ssh key used to authenticate the SSH session to the remote
|
- Path to an ssh key used to authenticate the SSH session to the remote
|
||||||
device. If the value is not specified in the task, the value of
|
device. If the value is not specified in the task, the value of
|
||||||
environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
||||||
|
type: str
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
- Specifies idle timeout (in seconds) for the connection. Useful if the
|
- Specifies idle timeout (in seconds) for the connection. Useful if the
|
||||||
console freezes before continuing. For example when saving
|
console freezes before continuing. For example when saving
|
||||||
configurations.
|
configurations.
|
||||||
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
notes:
|
notes:
|
||||||
- For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking).
|
- For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking).
|
||||||
|
|
|
@ -1,20 +1,7 @@
|
||||||
#
|
# -*- coding: utf-8 -*-
|
||||||
# (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
|
||||||
#
|
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
|
||||||
# This file is part of Ansible
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
#
|
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
|
|
||||||
class ModuleDocFragment(object):
|
class ModuleDocFragment(object):
|
||||||
|
@ -30,12 +17,14 @@ options:
|
||||||
- For more information please see the L(NXOS Platform Options guide, ../network/user_guide/platform_nxos.html).
|
- For more information please see the L(NXOS Platform Options guide, ../network/user_guide/platform_nxos.html).
|
||||||
- HORIZONTALLINE
|
- HORIZONTALLINE
|
||||||
- A dict object containing connection details.
|
- A dict object containing connection details.
|
||||||
|
type: dict
|
||||||
suboptions:
|
suboptions:
|
||||||
host:
|
host:
|
||||||
description:
|
description:
|
||||||
- Specifies the DNS host name or address for connecting to the remote
|
- Specifies the DNS host name or address for connecting to the remote
|
||||||
device over the specified transport. The value of host is used as
|
device over the specified transport. The value of host is used as
|
||||||
the destination address for the transport.
|
the destination address for the transport.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
port:
|
port:
|
||||||
description:
|
description:
|
||||||
|
@ -43,6 +32,7 @@ options:
|
||||||
device. This value applies to either I(cli) or I(nxapi). The port
|
device. This value applies to either I(cli) or I(nxapi). The port
|
||||||
value will default to the appropriate transport common port if
|
value will default to the appropriate transport common port if
|
||||||
none is provided in the task. (cli=22, http=80, https=443).
|
none is provided in the task. (cli=22, http=80, https=443).
|
||||||
|
type: int
|
||||||
default: 0 (use common port)
|
default: 0 (use common port)
|
||||||
username:
|
username:
|
||||||
description:
|
description:
|
||||||
|
@ -51,12 +41,14 @@ options:
|
||||||
either the CLI login or the nxapi authentication depending on which
|
either the CLI login or the nxapi authentication depending on which
|
||||||
transport is used. If the value is not specified in the task, the
|
transport is used. If the value is not specified in the task, the
|
||||||
value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead.
|
value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead.
|
||||||
|
type: str
|
||||||
password:
|
password:
|
||||||
description:
|
description:
|
||||||
- Specifies the password to use to authenticate the connection to
|
- Specifies the password to use to authenticate the connection to
|
||||||
the remote device. This is a common argument used for either I(cli)
|
the remote device. This is a common argument used for either I(cli)
|
||||||
or I(nxapi) transports. If the value is not specified in the task, the
|
or I(nxapi) transports. If the value is not specified in the task, the
|
||||||
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
|
value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead.
|
||||||
|
type: str
|
||||||
authorize:
|
authorize:
|
||||||
description:
|
description:
|
||||||
- Instructs the module to enter privileged mode on the remote device
|
- Instructs the module to enter privileged mode on the remote device
|
||||||
|
@ -66,35 +58,37 @@ options:
|
||||||
C(ANSIBLE_NET_AUTHORIZE) will be used instead.
|
C(ANSIBLE_NET_AUTHORIZE) will be used instead.
|
||||||
type: bool
|
type: bool
|
||||||
default: no
|
default: no
|
||||||
choices: ['yes', 'no']
|
version_added: '2.5.3'
|
||||||
version_added: 2.5.3
|
|
||||||
auth_pass:
|
auth_pass:
|
||||||
description:
|
description:
|
||||||
- Specifies the password to use if required to enter privileged mode
|
- Specifies the password to use if required to enter privileged mode
|
||||||
on the remote device. If I(authorize) is false, then this argument
|
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
|
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.
|
environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead.
|
||||||
default: none
|
type: str
|
||||||
version_added: 2.5.3
|
version_added: '2.5.3'
|
||||||
timeout:
|
timeout:
|
||||||
description:
|
description:
|
||||||
- Specifies the timeout in seconds for communicating with the network device
|
- Specifies the timeout in seconds for communicating with the network device
|
||||||
for either connecting or sending commands. If the timeout is
|
for either connecting or sending commands. If the timeout is
|
||||||
exceeded before the operation is completed, the module will error.
|
exceeded before the operation is completed, the module will error.
|
||||||
NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).
|
NX-API can be slow to return on long-running commands (sh mac, sh bgp, etc).
|
||||||
|
type: int
|
||||||
default: 10
|
default: 10
|
||||||
version_added: 2.3
|
version_added: '2.3'
|
||||||
ssh_keyfile:
|
ssh_keyfile:
|
||||||
description:
|
description:
|
||||||
- Specifies the SSH key to use to authenticate the connection to
|
- Specifies the SSH key to use to authenticate the connection to
|
||||||
the remote device. This argument is only used for the I(cli)
|
the remote device. This argument is only used for the I(cli)
|
||||||
transport. If the value is not specified in the task, the
|
transport. If the value is not specified in the task, the
|
||||||
value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead.
|
||||||
|
type: str
|
||||||
transport:
|
transport:
|
||||||
description:
|
description:
|
||||||
- Configures the transport connection to use when connecting to the
|
- Configures the transport connection to use when connecting to the
|
||||||
remote device. The transport argument supports connectivity to the
|
remote device. The transport argument supports connectivity to the
|
||||||
device over cli (ssh) or nxapi.
|
device over cli (ssh) or nxapi.
|
||||||
|
type: str
|
||||||
required: true
|
required: true
|
||||||
default: cli
|
default: cli
|
||||||
use_ssl:
|
use_ssl:
|
||||||
|
@ -102,18 +96,19 @@ options:
|
||||||
- Configures the I(transport) to use SSL if set to true only when the
|
- Configures the I(transport) to use SSL if set to true only when the
|
||||||
C(transport=nxapi), otherwise this value is ignored.
|
C(transport=nxapi), otherwise this value is ignored.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: no
|
||||||
validate_certs:
|
validate_certs:
|
||||||
description:
|
description:
|
||||||
- If C(no), SSL certificates will not be validated. This should only be used
|
- If C(no), SSL certificates will not be validated. This should only be used
|
||||||
on personally controlled sites using self-signed certificates. If the transport
|
on personally controlled sites using self-signed certificates. If the transport
|
||||||
argument is not nxapi, this value is ignored.
|
argument is not nxapi, this value is ignored.
|
||||||
type: bool
|
type: bool
|
||||||
|
default: yes
|
||||||
use_proxy:
|
use_proxy:
|
||||||
description:
|
description:
|
||||||
- If C(no), the environment variables C(http_proxy) and C(https_proxy) will be ignored.
|
- If C(no), the environment variables C(http_proxy) and C(https_proxy) will be ignored.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'yes'
|
default: yes
|
||||||
version_added: "2.5"
|
version_added: "2.5"
|
||||||
|
|
||||||
notes:
|
notes:
|
||||||
|
|
|
@ -55,10 +55,10 @@ options:
|
||||||
description:
|
description:
|
||||||
- PEM formatted certificate chain file to be used for SSL client authentication.
|
- PEM formatted certificate chain file to be used for SSL client authentication.
|
||||||
- This file can also include the key as well, and if the key is included, C(client_key) is not required.
|
- This file can also include the key as well, and if the key is included, C(client_key) is not required.
|
||||||
type: str
|
type: path
|
||||||
client_key:
|
client_key:
|
||||||
description:
|
description:
|
||||||
- PEM formatted file that contains your private key to be used for SSL client authentication.
|
- PEM formatted file that contains your private key to be used for SSL client authentication.
|
||||||
- If C(client_cert) contains both the certificate and key, this option is not required.
|
- If C(client_cert) contains both the certificate and key, this option is not required.
|
||||||
type: str
|
type: path
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -885,10 +885,7 @@ lib/ansible/modules/system/cron.py E324
|
||||||
lib/ansible/modules/system/cronvar.py E324
|
lib/ansible/modules/system/cronvar.py E324
|
||||||
lib/ansible/modules/system/crypttab.py E324
|
lib/ansible/modules/system/crypttab.py E324
|
||||||
lib/ansible/modules/system/debconf.py E326
|
lib/ansible/modules/system/debconf.py E326
|
||||||
lib/ansible/modules/system/firewalld.py E322
|
|
||||||
lib/ansible/modules/system/firewalld.py E324
|
lib/ansible/modules/system/firewalld.py E324
|
||||||
lib/ansible/modules/system/firewalld.py E325
|
|
||||||
lib/ansible/modules/system/firewalld.py E326
|
|
||||||
lib/ansible/modules/system/iptables.py E326
|
lib/ansible/modules/system/iptables.py E326
|
||||||
lib/ansible/modules/system/java_cert.py E324
|
lib/ansible/modules/system/java_cert.py E324
|
||||||
lib/ansible/modules/system/known_hosts.py E324
|
lib/ansible/modules/system/known_hosts.py E324
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue