diff --git a/lib/ansible/module_utils/common/removed.py b/lib/ansible/module_utils/common/removed.py
index 81921c72aa..43c7ffaac4 100644
--- a/lib/ansible/module_utils/common/removed.py
+++ b/lib/ansible/module_utils/common/removed.py
@@ -1,20 +1,48 @@
# Copyright (c) 2018, Ansible Project
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
-from ansible.module_utils._text import to_text
+import json
+import sys
+
+from ansible.module_utils._text import to_native
-def removed_module(msg=u'This module has been removed. The module documentation may contain hints for porting'):
+def removed_module(removed_in, msg='This module has been removed. The module documentation for'
+ ' Ansible-%(version)s may contain hints for porting'):
"""
- When a module is removed, we want the documentation available for a few releases to aid in
- porting playbooks. So leave the documentation but remove the actual code and instead have this
- boilerplate::
+ Returns module failure along with a message about the module being removed
+
+ :arg removed_in: The version that the module was removed in
+ :kwarg msg: Message to use in the module's failure message. The default says that the module
+ has been removed and what version of the Ansible documentation to search for porting help.
+
+ Remove the actual code and instead have boilerplate like this::
from ansible.module_utils.common.removed import removed_module
if __name__ == '__main__':
- removed_module()
+ removed_module("2.4")
"""
- # We may not have an AnsibleModule when this is called
- msg = to_text(msg).translate({ord(u'"'): u'\\"'})
- print('\n{{"msg": "{0}", "failed": true}}'.format(msg))
+ results = {'failed': True}
+
+ # Convert numbers into strings
+ removed_in = to_native(removed_in)
+
+ version = removed_in.split('.')
+ try:
+ numeric_minor = int(version[-1])
+ except Exception as e:
+ last_version = None
+ else:
+ version = version[:-1]
+ version.append(to_native(numeric_minor - 1))
+ last_version = '.'.join(version)
+
+ if last_version is None:
+ results['warnings'] = ['removed modules should specify the version they were removed in']
+ results['msg'] = 'This module has been removed'
+ else:
+ results['msg'] = msg % {'version': last_version}
+
+ print('\n{0}\n'.format(json.dumps(results)))
+ sys.exit(1)
diff --git a/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py b/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py
index c17a3727bb..5abf392e84 100644
--- a/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py
+++ b/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py
@@ -8,86 +8,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: ec2_ami_search
-short_description: Retrieve AWS AMI information for a given operating system.
-deprecated:
- removed_in: "2.2"
- why: Various AWS modules have been combined and replaced with M(ec2_ami_facts).
- alternative: Use M(ec2_ami_find) instead.
-version_added: "1.6"
-description:
- - Look up the most recent AMI on AWS for a given operating system.
- - Returns C(ami), C(aki), C(ari), C(serial), C(tag)
- - If there is no AKI or ARI associated with an image, these will be C(null).
- - Only supports images from cloud-images.ubuntu.com
- - 'Example output: C({"ami": "ami-69f5a900", "changed": false, "aki": "aki-88aa75e1", "tag": "release", "ari": null, "serial": "20131024"})'
-options:
- distro:
- description: Linux distribution (e.g., C(ubuntu))
- required: true
- choices: ["ubuntu"]
- release:
- description: short name of the release (e.g., C(precise))
- required: true
- stream:
- description: Type of release.
- required: false
- default: "server"
- choices: ["server", "desktop"]
- store:
- description: Back-end store for instance
- required: false
- default: "ebs"
- choices: ["ebs", "ebs-io1", "ebs-ssd", "instance-store"]
- arch:
- description: CPU architecture
- required: false
- default: "amd64"
- choices: ["i386", "amd64"]
- region:
- description: EC2 region
- required: false
- default: us-east-1
- choices: ["ap-northeast-1", "ap-southeast-1", "ap-northeast-2",
- "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1",
- "eu-west-2", "sa-east-1", "us-east-1", "us-east-2", "us-west-1",
- "us-west-2", "us-gov-west-1"]
- virt:
- description: virutalization type
- required: false
- default: paravirtual
- choices: ["paravirtual", "hvm"]
-
-author: "Ansible Core Team (deprecated)"
-'''
-
-EXAMPLES = '''
-- name: Launch an Ubuntu 12.04 (Precise Pangolin) EC2 instance
- hosts: 127.0.0.1
- connection: local
- tasks:
- - name: Get the Ubuntu precise AMI
- ec2_ami_search:
- distro: ubuntu
- release: precise
- region: us-west-1
- store: instance-store
- register: ubuntu_image
-
- - name: Start the EC2 instance
- ec2:
- image: "{{ ubuntu_image.ami }}"
- instance_type: m1.small
- key_name: mykey
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in='2.2')
diff --git a/lib/ansible/modules/cloud/amazon/_ec2_facts.py b/lib/ansible/modules/cloud/amazon/_ec2_facts.py
new file mode 100644
index 0000000000..0f7a8a3b01
--- /dev/null
+++ b/lib/ansible/modules/cloud/amazon/_ec2_facts.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# 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
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['removed'],
+ 'supported_by': 'community'}
+
+
+from ansible.module_utils.common.removed import removed_module
+
+
+if __name__ == '__main__':
+ removed_module(removed_in='2.7')
diff --git a/lib/ansible/modules/cloud/amazon/_ec2_vpc.py b/lib/ansible/modules/cloud/amazon/_ec2_vpc.py
index 5f8fc60240..1c07b7410d 100644
--- a/lib/ansible/modules/cloud/amazon/_ec2_vpc.py
+++ b/lib/ansible/modules/cloud/amazon/_ec2_vpc.py
@@ -7,148 +7,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'certified'}
-DOCUMENTATION = '''
----
-module: ec2_vpc
-short_description: configure AWS virtual private clouds
-description:
- - Create or terminates AWS virtual private clouds. This module has a dependency on python-boto.
-version_added: "1.4"
-deprecated:
- removed_in: "2.5"
- why: Replaced by dedicated modules.
- alternative: Use M(ec2_vpc_net) along with supporting modules including M(ec2_vpc_igw), M(ec2_vpc_route_table), M(ec2_vpc_subnet),
- M(ec2_vpc_dhcp_option), M(ec2_vpc_nat_gateway), M(ec2_vpc_nacl).
-options:
- cidr_block:
- description:
- - "The cidr block representing the VPC, e.g. C(10.0.0.0/16), required when I(state=present)."
- instance_tenancy:
- description:
- - "The supported tenancy options for instances launched into the VPC."
- default: "default"
- choices: [ "default", "dedicated" ]
- dns_support:
- description:
- - Toggles the "Enable DNS resolution" flag.
- type: bool
- default: 'yes'
- dns_hostnames:
- description:
- - Toggles the "Enable DNS hostname support for instances" flag.
- type: bool
- default: 'yes'
- subnets:
- description:
- - 'A dictionary array of subnets to add of the form C({ cidr: ..., az: ... , resource_tags: ... }).'
- - Where C(az) is the desired availability zone of the subnet, optional.
- - 'Tags C(resource_tags) use dictionary form C({ "Environment":"Dev", "Tier":"Web", ...}), optional.'
- - C(resource_tags) see resource_tags for VPC below. The main difference is subnet tags not specified here will be deleted.
- - All VPC subnets not in this list will be removed as well.
- - As of 1.8, if the subnets parameter is not specified, no existing subnets will be modified.'
- vpc_id:
- description:
- - A VPC id to terminate when I(state=absent).
- resource_tags:
- description:
- - 'A dictionary array of resource tags of the form C({ tag1: value1, tag2: value2 }).
- - Tags in this list are used in conjunction with CIDR block to uniquely identify a VPC in lieu of vpc_id. Therefore,
- if CIDR/Tag combination does not exist, a new VPC will be created. VPC tags not on this list will be ignored. Prior to 1.7,
- specifying a resource tag was optional.'
- required: true
- version_added: "1.6"
- internet_gateway:
- description:
- - Toggle whether there should be an Internet gateway attached to the VPC.
- type: bool
- default: 'no'
- route_tables:
- description:
- - >
- A dictionary array of route tables to add of the form:
- C({ subnets: [172.22.2.0/24, 172.22.3.0/24,], routes: [{ dest: 0.0.0.0/0, gw: igw},], resource_tags: ... }). Where the subnets list is
- those subnets the route table should be associated with, and the routes list is a list of routes to be in the table. The special keyword
- for the gw of igw specifies that you should the route should go through the internet gateway attached to the VPC. gw also accepts instance-ids,
- interface-ids, and vpc-peering-connection-ids in addition igw. resource_tags is optional and uses dictionary form: C({ "Name": "public", ... }).
- This module is currently unable to affect the "main" route table due to some limitations in boto, so you must explicitly define the associated
- subnets or they will be attached to the main table implicitly. As of 1.8, if the route_tables parameter is not specified, no existing routes
- will be modified.
- wait:
- description:
- - Wait for the VPC to be in state 'available' before returning.
- type: bool
- default: 'no'
- wait_timeout:
- description:
- - How long before wait gives up, in seconds.
- default: 300
- state:
- description:
- - Create or terminate the VPC.
- required: true
- choices: [ "present", "absent" ]
-author: "Carson Gee (@carsongee)"
-extends_documentation_fragment:
- - aws
- - ec2
-'''
-
-EXAMPLES = '''
-# Note: None of these examples set aws_access_key, aws_secret_key, or region.
-# It is assumed that their matching environment variables are set.
-
-# Basic creation example:
- - ec2_vpc:
- state: present
- cidr_block: 172.23.0.0/16
- resource_tags: { "Environment":"Development" }
- region: us-west-2
-# Full creation example with subnets and optional availability zones.
-# The absence or presence of subnets deletes or creates them respectively.
- - ec2_vpc:
- state: present
- cidr_block: 172.22.0.0/16
- resource_tags: { "Environment":"Development" }
- subnets:
- - cidr: 172.22.1.0/24
- az: us-west-2c
- resource_tags: { "Environment":"Dev", "Tier" : "Web" }
- - cidr: 172.22.2.0/24
- az: us-west-2b
- resource_tags: { "Environment":"Dev", "Tier" : "App" }
- - cidr: 172.22.3.0/24
- az: us-west-2a
- resource_tags: { "Environment":"Dev", "Tier" : "DB" }
- internet_gateway: True
- route_tables:
- - subnets:
- - 172.22.2.0/24
- - 172.22.3.0/24
- routes:
- - dest: 0.0.0.0/0
- gw: igw
- - subnets:
- - 172.22.1.0/24
- routes:
- - dest: 0.0.0.0/0
- gw: igw
- region: us-west-2
- register: vpc
-
-# Removal of a VPC by id
- - ec2_vpc:
- state: absent
- vpc_id: vpc-aaaaaaa
- region: us-west-2
-# If you have added elements not managed by this module, e.g. instances, NATs, etc then
-# the delete will fail until those dependencies are removed.
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/cloud/amazon/_s3.py b/lib/ansible/modules/cloud/amazon/_s3.py
new file mode 100644
index 0000000000..0f7a8a3b01
--- /dev/null
+++ b/lib/ansible/modules/cloud/amazon/_s3.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# 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
+
+ANSIBLE_METADATA = {'metadata_version': '1.1',
+ 'status': ['removed'],
+ 'supported_by': 'community'}
+
+
+from ansible.module_utils.common.removed import removed_module
+
+
+if __name__ == '__main__':
+ removed_module(removed_in='2.7')
diff --git a/lib/ansible/modules/cloud/docker/_docker.py b/lib/ansible/modules/cloud/docker/_docker.py
index 9135fbc147..ad8ede8c0b 100644
--- a/lib/ansible/modules/cloud/docker/_docker.py
+++ b/lib/ansible/modules/cloud/docker/_docker.py
@@ -10,478 +10,12 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: docker
-version_added: "1.4"
-short_description: manage docker containers
-deprecated:
- removed_in: "2.4"
- why: Replaced by dedicated modules.
- alternative: Use M(docker_container) and M(docker_image) instead.
-description:
- - This is the original Ansible module for managing the Docker container life cycle.
- - NOTE - Additional and newer modules are available. For the latest on orchestrating containers with Ansible
- visit our Getting Started with Docker Guide at U(https://github.com/ansible/ansible/blob/devel/docs/docsite/rst/scenario_guides/guide_docker.rst).
-options:
- count:
- description:
- - Number of matching containers that should be in the desired state.
- default: 1
- image:
- description:
- - Container image used to match and launch containers.
- required: true
- pull:
- description:
- - Control when container images are updated from the C(docker_url) registry.
- - If C(missing), images will be pulled only when missing from the host;
- - if C(always), the registry will be checked for a newer version of the image each time the task executes.
- choices: [ always, missing ]
- default: missing
- version_added: "1.9"
- entrypoint:
- description:
- - Corresponds to C(--entrypoint) option of C(docker run) command and
- C(ENTRYPOINT) directive of Dockerfile.
- - Used to match and launch containers.
- version_added: "2.1"
- command:
- description:
- - Command used to match and launch containers.
- name:
- description:
- - Name used to match and uniquely name launched containers. Explicit names
- are used to uniquely identify a single container or to link among
- containers. Mutually exclusive with a "count" other than "1".
- version_added: "1.5"
- ports:
- description:
- - "List containing private to public port mapping specification.
- Use docker 'CLI-style syntax: C(8000), C(9000:8000), or C(0.0.0.0:9000:8000)'
- where 8000 is a container port, 9000 is a host port, and 0.0.0.0 is - a host interface.
- The container ports need to be exposed either in the Dockerfile or via the C(expose) option."
- version_added: "1.5"
- expose:
- description:
- - List of additional container ports to expose for port mappings or links.
- If the port is already exposed using EXPOSE in a Dockerfile, you don't
- need to expose it again.
- version_added: "1.5"
- publish_all_ports:
- description:
- - Publish all exposed ports to the host interfaces.
- type: bool
- default: 'no'
- version_added: "1.5"
- volumes:
- description:
- - List of volumes to mount within the container.
- - 'Use docker CLI-style syntax: C(/host:/container[:mode])'
- - You can specify a read mode for the mount with either C(ro) or C(rw).
- Starting at version 2.1, SELinux hosts can additionally use C(z) or C(Z)
- mount options to use a shared or private label for the volume.
- volumes_from:
- description:
- - List of names of containers to mount volumes from.
- links:
- description:
- - List of other containers to link within this container with an optional.
- - 'alias. Use docker CLI-style syntax: C(redis:myredis).'
- version_added: "1.5"
- devices:
- description:
- - List of host devices to expose to container.
- version_added: "2.1"
- log_driver:
- description:
- - You can specify a different logging driver for the container than for the daemon.
- - C(awslogs) - (added in 2.1) Awslogs logging driver for Docker. Writes log messages to AWS Cloudwatch Logs.
- - C(fluentd) - Fluentd logging driver for Docker. Writes log messages to "fluentd" (forward input).
- - C(gelf) - Graylog Extended Log Format (GELF) logging driver for Docker. Writes log messages to a GELF endpoint likeGraylog or Logstash.
- - C(journald) - Journald logging driver for Docker. Writes log messages to "journald".
- - C(json-file) - Default logging driver for Docker. Writes JSON messages to file.
- docker logs command is available only for this logging driver.
- - C(none) - disables any logging for the container.
- - C(syslog) - Syslog logging driver for Docker. Writes log messages to syslog.
- docker logs command is not available for this logging driver.
- - Requires docker >= 1.6.0.
- default: json-file
- choices:
- - awslogs
- - fluentd
- - gelf
- - journald
- - json-file
- - none
- - syslog
- version_added: "2.0"
- log_opt:
- description:
- - Additional options to pass to the logging driver selected above. See Docker `log-driver
- ` documentation for more information.
- Requires docker >=1.7.0.
- version_added: "2.0"
- memory_limit:
- description:
- - RAM allocated to the container as a number of bytes or as a human-readable
- string like "512MB".
- - Leave as "0" to specify no limit.
- default: 0
- docker_url:
- description:
- - URL of the host running the docker daemon. This will default to the env
- var DOCKER_HOST if unspecified.
- default: ${DOCKER_HOST} or unix://var/run/docker.sock
- use_tls:
- description:
- - Whether to use tls to connect to the docker server. "no" means not to
- use tls (and ignore any other tls related parameters). "encrypt" means
- to use tls to encrypt the connection to the server. "verify" means to
- also verify that the server's certificate is valid for the server
- (this both verifies the certificate against the CA and that the
- certificate was issued for that host. If this is unspecified, tls will
- only be used if one of the other tls options require it.
- choices: [ encrypt, no, verify ]
- version_added: "1.9"
- tls_client_cert:
- description:
- - Path to the PEM-encoded certificate used to authenticate docker client.
- If specified tls_client_key must be valid
- default: ${DOCKER_CERT_PATH}/cert.pem
- version_added: "1.9"
- tls_client_key:
- description:
- - Path to the PEM-encoded key used to authenticate docker client. If
- specified tls_client_cert must be valid
- default: ${DOCKER_CERT_PATH}/key.pem
- version_added: "1.9"
- tls_ca_cert:
- description:
- - Path to a PEM-encoded certificate authority to secure the Docker connection.
- This has no effect if use_tls is encrypt.
- default: ${DOCKER_CERT_PATH}/ca.pem
- version_added: "1.9"
- tls_hostname:
- description:
- - A hostname to check matches what's supplied in the docker server's
- certificate. If unspecified, the hostname is taken from the docker_url.
- default: Taken from docker_url
- version_added: "1.9"
- docker_api_version:
- description:
- - Remote API version to use. This defaults to the current default as
- specified by docker-py.
- default: docker-py default remote API version
- version_added: "1.8"
- docker_user:
- description:
- - Username or UID to use within the container
- version_added: "2.0"
- username:
- description:
- - Remote API username.
- password:
- description:
- - Remote API password.
- email:
- description:
- - Remote API email.
- hostname:
- description:
- - Container hostname.
- domainname:
- description:
- - Container domain name.
- env:
- description:
- - Pass a dict of environment variables to the container.
- env_file:
- description:
- - Pass in a path to a file with environment variable (FOO=BAR).
- If a key value is present in both explicitly presented (i.e. as 'env')
- and in the environment file, the explicit value will override.
- Requires docker-py >= 1.4.0.
- version_added: "2.1"
- dns:
- description:
- - List of custom DNS servers for the container.
- detach:
- description:
- - Enable detached mode to leave the container running in background. If
- disabled, fail unless the process exits cleanly.
- type: bool
- default: 'yes'
- signal:
- description:
- - With the state "killed", you can alter the signal sent to the
- container.
- default: KILL
- version_added: "2.0"
- state:
- description:
- - Assert the container's desired state. "present" only asserts that the
- matching containers exist. "started" asserts that the matching
- containers both exist and are running, but takes no action if any
- configuration has changed. "reloaded" (added in Ansible 1.9) asserts that all matching
- containers are running and restarts any that have any images or
- configuration out of date. "restarted" unconditionally restarts (or
- starts) the matching containers. "stopped" and '"killed" stop and kill
- all matching containers. "absent" stops and then' removes any matching
- containers.
- default: started
- choices:
- - absent
- - killed
- - present
- - reloaded
- - restarted
- - started
- - stopped
- privileged:
- description:
- - Whether the container should run in privileged mode or not.
- type: bool
- default: 'no'
- lxc_conf:
- description:
- - LXC configuration parameters, such as C(lxc.aa_profile:unconfined).
- stdin_open:
- description:
- - Keep stdin open after a container is launched.
- type: bool
- default: 'no'
- version_added: "1.6"
- tty:
- description:
- - Allocate a pseudo-tty within the container.
- type: bool
- default: 'no'
- version_added: "1.6"
- net:
- description:
- - 'Network mode for the launched container: bridge, none, container:'
- - or host.
- - Requires docker >= 0.11.
- type: bool
- default: 'no'
- version_added: "1.8"
- pid:
- description:
- - Set the PID namespace mode for the container (currently only supports 'host').
- - Requires docker-py >= 1.0.0 and docker >= 1.5.0
- version_added: "1.9"
- registry:
- description:
- - Remote registry URL to pull images from.
- default: DockerHub
- version_added: "1.8"
- read_only:
- description:
- - Mount the container's root filesystem as read only.
- version_added: "2.0"
- restart_policy:
- description:
- - Container restart policy.
- - The 'unless-stopped' choice is only available starting in Ansible 2.1 and for Docker 1.9 and above.
- choices: [ always, no, on-failure, unless-stopped ]
- version_added: "1.9"
- restart_policy_retry:
- description:
- - Maximum number of times to restart a container.
- - Leave as "0" for unlimited retries.
- default: 0
- version_added: "1.9"
- extra_hosts:
- description:
- - Dict of custom host-to-IP mappings to be defined in the container
- version_added: "2.0"
- insecure_registry:
- description:
- - Use insecure private registry by HTTP instead of HTTPS.
- - Needed for docker-py >= 0.5.0.
- type: bool
- default: 'no'
- version_added: "1.9"
- cpu_set:
- description:
- - CPUs in which to allow execution.
- - Requires docker-py >= 0.6.0.
- version_added: "2.0"
- cap_add:
- description:
- - Add capabilities for the container.
- - Requires docker-py >= 0.5.0.
- type: bool
- default: 'no'
- version_added: "2.0"
- cap_drop:
- description:
- - Drop capabilities for the container.
- - Requires docker-py >= 0.5.0.
- type: bool
- default: 'no'
- version_added: "2.0"
- labels:
- description:
- - Set container labels.
- - Requires docker >= 1.6 and docker-py >= 1.2.0.
- version_added: "2.1"
- stop_timeout:
- description:
- - How many seconds to wait for the container to stop before killing it.
- default: 10
- version_added: "2.0"
- timeout:
- description:
- - Docker daemon response timeout in seconds.
- default: 60
- version_added: "2.1"
- cpu_shares:
- description:
- - CPU shares (relative weight).
- - Requires docker-py >= 0.6.0.
- default: 0
- version_added: "2.1"
- ulimits:
- description:
- - ulimits, list ulimits with name, soft and optionally
- hard limit separated by colons. e.g. C(nofile:1024:2048)
- - Requires docker-py >= 1.2.0 and docker >= 1.6.0
- version_added: "2.1"
-
-author:
- - Cove Schneider (@cove)
- - Joshua Conner (@joshuaconner)
- - Pavel Antonov (@softzilla)
- - Thomas Steinbach (@ThomasSteinbach)
- - Philippe Jandot (@zfil)
- - Daan Oosterveld (@dusdanig)
-requirements:
- - python >= 2.6
- - docker-py >= 0.3.0
- - The docker server >= 0.10.0
-'''
-
-EXAMPLES = '''
-# Containers are matched either by name (if provided) or by an exact match of
-# the image they were launched with and the command they're running. The module
-# can accept either a name to target a container uniquely, or a count to operate
-# on multiple containers at once when it makes sense to do so.
-
-# Ensure that a data container with the name "mydata" exists. If no container
-# by this name exists, it will be created, but not started.
-
-- name: data container
- docker:
- name: mydata
- image: busybox
- state: present
- volumes:
- - /data
-
-# Ensure that a Redis server is running, using the volume from the data
-# container. Expose the default Redis port.
-
-- name: redis container
- docker:
- name: myredis
- image: redis
- command: redis-server --appendonly yes
- state: started
- expose:
- - 6379
- volumes_from:
- - mydata
-
-# Ensure that a container of your application server is running. This will:
-# - pull the latest version of your application image from DockerHub.
-# - ensure that a container is running with the specified name and exact image.
-# If any configuration options have changed, the existing container will be
-# stopped and removed, and a new one will be launched in its place.
-# - link this container to the existing redis container launched above with
-# an alias.
-# - grant the container read write permissions for the host's /dev/sda device
-# through a node named /dev/xvda
-# - bind TCP port 9000 within the container to port 8080 on all interfaces
-# on the host.
-# - bind UDP port 9001 within the container to port 8081 on the host, only
-# listening on localhost.
-# - specify 2 ip resolutions.
-# - set the environment variable SECRET_KEY to "ssssh".
-
-- name: application container
- docker:
- name: myapplication
- image: someuser/appimage
- state: reloaded
- pull: always
- links:
- - "myredis:aliasedredis"
- devices:
- - "/dev/sda:/dev/xvda:rwm"
- ports:
- - "8080:9000"
- - "127.0.0.1:8081:9001/udp"
- extra_hosts:
- host1: "192.168.0.1"
- host2: "192.168.0.2"
- env:
- SECRET_KEY: ssssh
-
-# Ensure that exactly five containers of another server are running with this
-# exact image and command. If fewer than five are running, more will be launched;
-# if more are running, the excess will be stopped.
-
-- name: load-balanced containers
- docker:
- state: reloaded
- count: 5
- image: someuser/anotherappimage
- command: sleep 1d
-
-# Unconditionally restart a service container. This may be useful within a
-# handler, for example.
-
-- name: application service
- docker:
- name: myservice
- image: someuser/serviceimage
- state: restarted
-
-# Stop all containers running the specified image.
-
-- name: obsolete container
- docker:
- image: someuser/oldandbusted
- state: stopped
-
-# Stop and remove a container with the specified name.
-
-- name: obsolete container
- docker:
- name: ohno
- image: someuser/oldandbusted
- state: absent
-
-# Example Syslogging Output
-
-- name: myservice container
- docker:
- name: myservice
- image: someservice/someimage
- state: reloaded
- log_driver: syslog
- log_opt:
- syslog-address: tcp://my-syslog-server:514
- syslog-facility: daemon
- syslog-tag: myservice
-'''
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in='2.4')
diff --git a/lib/ansible/modules/network/cumulus/_cl_bond.py b/lib/ansible/modules/network/cumulus/_cl_bond.py
index fed468d30d..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_bond.py
+++ b/lib/ansible/modules/network/cumulus/_cl_bond.py
@@ -9,210 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
----
-module: cl_bond
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Configures a bond port on Cumulus Linux
-deprecated:
- removed_in: "2.5"
- why: The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way.
- alternative: Use M(nclu) instead.
-description:
- - Configures a bond interface on Cumulus Linux To configure a bridge port
- use the cl_bridge module. To configure any other type of interface use the
- cl_interface module. Follow the guidelines for bonding found in the
- Cumulus User Guide at U(http://docs.cumulusnetworks.com).
-options:
- name:
- description:
- - Name of the interface.
- required: true
- alias_name:
- description:
- - Description of the port.
- ipv4:
- description:
- - List of IPv4 addresses to configure on the interface.
- In the form I(X.X.X.X/YY).
- ipv6:
- description:
- - List of IPv6 addresses to configure on the interface.
- In the form I(X:X:X::X/YYY).
- addr_method:
- description:
- - Configures the port to use DHCP.
- To enable this feature use the option I(dhcp).
- choices: ['dhcp']
- mtu:
- description:
- - Set MTU. Configure Jumbo Frame by setting MTU to I(9000).
- virtual_ip:
- description:
- - Define IPv4 virtual IP used by the Cumulus Linux VRR feature.
- virtual_mac:
- description:
- - Define Ethernet mac associated with Cumulus Linux VRR feature.
- vids:
- description:
- - In vlan-aware mode, lists VLANs defined under the interface.
- mstpctl_bpduguard:
- description:
- - Enables BPDU Guard on a port in vlan-aware mode.
- choices:
- - true
- - false
- mstpctl_portnetwork:
- description:
- - Enables bridge assurance in vlan-aware mode.
- choices:
- - true
- - false
- mstpctl_portadminedge:
- description:
- - Enables admin edge port.
- choices:
- - true
- - false
- clag_id:
- description:
- - Specify a unique clag_id for every dual connected bond on each
- peer switch. The value must be between 1 and 65535 and must be the
- same on both peer switches in order for the bond to be considered
- dual-connected.
- pvid:
- description:
- - In vlan-aware mode, defines vlan that is the untagged vlan.
- miimon:
- description:
- - The mii link monitoring interval.
- default: 100
- mode:
- description:
- - The bond mode, as of Cumulus Linux 2.5 only LACP bond mode is
- supported.
- default: '802.3ad'
- min_links:
- description:
- - Minimum number of links.
- default: 1
- lacp_bypass_allow:
- description:
- - Enable LACP bypass.
- lacp_bypass_period:
- description:
- - Period for enabling LACP bypass. Max value is 900.
- lacp_bypass_priority:
- description:
- - List of ports and priorities. Example I("swp1=10, swp2=20").
- lacp_bypass_all_active:
- description:
- - Activate all interfaces for bypass.
- It is recommended to configure all_active instead
- of using bypass_priority.
- lacp_rate:
- description:
- - The lacp rate.
- default: 1
- slaves:
- description:
- - Bond members.
- required: True
- xmit_hash_policy:
- description:
- - Transmit load balancing algorithm. As of Cumulus Linux 2.5 only
- I(layer3+4) policy is supported.
- default: layer3+4
- location:
- description:
- - Interface directory location.
- default:
- - '/etc/network/interfaces.d'
-
-requirements: [ Alternate Debian network interface manager - \
-ifupdown2 @ github.com/CumulusNetworks/ifupdown2 ]
-notes:
- - As this module writes the interface directory location, ensure that
- ``/etc/network/interfaces`` has a 'source /etc/network/interfaces.d/\*' or
- whatever path is mentioned in the ``location`` attribute.
-
- - For the config to be activated, i.e installed in the kernel,
- "service networking reload" needs be be executed. See EXAMPLES section.
-'''
-
-EXAMPLES = '''
-# Options ['virtual_mac', 'virtual_ip'] are required together
-# configure a bond interface with IP address
-- cl_bond:
- name: bond0
- slaves:
- - swp4-5
- ipv4: 10.1.1.1/24
-
-# configure bond as a dual-connected clag bond
-- cl_bond:
- name: bond1
- slaves:
- - swp1s0
- - swp2s0
- clag_id: 1
-
-# define cl_bond once in tasks file
-# then write interface config in variables file
-# with just the options you want.
-- cl_bond:
- name: "{{ item.key }}"
- slaves: "{{ item.value.slaves }}"
- clag_id: "{{ item.value.clag_id|default(omit) }}"
- ipv4: "{{ item.value.ipv4|default(omit) }}"
- ipv6: "{{ item.value.ipv6|default(omit) }}"
- alias_name: "{{ item.value.alias_name|default(omit) }}"
- addr_method: "{{ item.value.addr_method|default(omit) }}"
- mtu: "{{ item.value.mtu|default(omit) }}"
- vids: "{{ item.value.vids|default(omit) }}"
- virtual_ip: "{{ item.value.virtual_ip|default(omit) }}"
- virtual_mac: "{{ item.value.virtual_mac|default(omit) }}"
- mstpctl_portnetwork: "{{ item.value.mstpctl_portnetwork|default('no') }}"
- mstpctl_portadminedge: "{{ item.value.mstpctl_portadminedge|default('no') }}"
- mstpctl_bpduguard: "{{ item.value.mstpctl_bpduguard|default('no') }}"
- with_dict: "{{ cl_bonds }}"
-
-# In vars file
-# ============
----
-cl_bonds:
- bond0:
- alias_name: uplink to isp
- slaves:
- - swp1
- - swp3
- ipv4: 10.1.1.1/24'
- bond2:
- vids:
- - 1
- - 50
- clag_id: 1
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/cumulus/_cl_bridge.py b/lib/ansible/modules/network/cumulus/_cl_bridge.py
index 00b498d5e9..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_bridge.py
+++ b/lib/ansible/modules/network/cumulus/_cl_bridge.py
@@ -9,158 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
----
-module: cl_bridge
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Configures a bridge port on Cumulus Linux
-deprecated:
- removed_in: "2.5"
- why: The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way.
- alternative: Use M(nclu) instead.
-description:
- - Configures a bridge interface on Cumulus Linux To configure a bond port
- use the cl_bond module. To configure any other type of interface use the
- cl_interface module. Follow the guidelines for bridging found in the
- Cumulus User Guide at U(http://docs.cumulusnetworks.com)
-options:
- name:
- description:
- - Name of the interface.
- required: true
- alias_name:
- description:
- - Description of the port.
- ipv4:
- description:
- - List of IPv4 addresses to configure on the interface.
- In the form I(X.X.X.X/YY).
- ipv6:
- description:
- - List of IPv6 addresses to configure on the interface.
- In the form I(X:X:X::X/YYY).
- addr_method:
- description:
- - Configures the port to use DHCP.
- To enable this feature use the option I(dhcp).
- choices: ['dhcp']
- mtu:
- description:
- - Set MTU. Configure Jumbo Frame by setting MTU to I(9000).
- virtual_ip:
- description:
- - Define IPv4 virtual IP used by the Cumulus Linux VRR feature.
- virtual_mac:
- description:
- - Define Ethernet mac associated with Cumulus Linux VRR feature.
- vids:
- description:
- - In vlan-aware mode, lists VLANs defined under the interface.
- pvid:
- description:
- - In vlan-aware mode, defines vlan that is the untagged vlan.
- stp:
- description:
- - Enables spanning tree Protocol. As of Cumulus Linux 2.5 the default
- bridging mode, only per vlan RSTP or 802.1d is supported. For the
- vlan aware mode, only common instance STP is supported
- default: 'yes'
- choices: ['yes', 'no']
- ports:
- description:
- - List of bridge members.
- required: True
- vlan_aware:
- description:
- - Enables vlan-aware mode.
- choices: ['yes', 'no']
- mstpctl_treeprio:
- description:
- - Set spanning tree root priority. Must be a multiple of 4096.
- location:
- description:
- - Interface directory location.
- default:
- - '/etc/network/interfaces.d'
-
-
-requirements: [ Alternate Debian network interface manager
-ifupdown2 @ github.com/CumulusNetworks/ifupdown2 ]
-notes:
- - As this module writes the interface directory location, ensure that
- ``/etc/network/interfaces`` has a 'source /etc/network/interfaces.d/\*' or
- whatever path is mentioned in the ``location`` attribute.
-
- - For the config to be activated, i.e installed in the kernel,
- "service networking reload" needs be be executed. See EXAMPLES section.
-'''
-
-EXAMPLES = '''
-# Options ['virtual_mac', 'virtual_ip'] are required together
-# configure a bridge vlan aware bridge.
-- cl_bridge:
- name: br0
- ports: 'swp1-12'
- vlan_aware: 'yes'
- notify: reload networking
-
-# configure bridge interface to define a default set of vlans
-- cl_bridge:
- name: bridge
- ports: 'swp1-12'
- vlan_aware: 'yes'
- vids: '1-100'
- notify: reload networking
-
-# define cl_bridge once in tasks file
-# then write interface config in variables file
-# with just the options you want.
-- cl_bridge:
- name: "{{ item.key }}"
- ports: "{{ item.value.ports }}"
- vlan_aware: "{{ item.value.vlan_aware|default(omit) }}"
- ipv4: "{{ item.value.ipv4|default(omit) }}"
- ipv6: "{{ item.value.ipv6|default(omit) }}"
- alias_name: "{{ item.value.alias_name|default(omit) }}"
- addr_method: "{{ item.value.addr_method|default(omit) }}"
- mtu: "{{ item.value.mtu|default(omit) }}"
- vids: "{{ item.value.vids|default(omit) }}"
- virtual_ip: "{{ item.value.virtual_ip|default(omit) }}"
- virtual_mac: "{{ item.value.virtual_mac|default(omit) }}"
- mstpctl_treeprio: "{{ item.value.mstpctl_treeprio|default(omit) }}"
- with_dict: "{{ cl_bridges }}"
- notify: reload networking
-
-# In vars file
-# ============
----
-cl_bridge:
- br0:
- alias_name: 'vlan aware bridge'
- ports: ['swp1', 'swp3']
- vlan_aware: true
- vids: ['1-100']
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/cumulus/_cl_img_install.py b/lib/ansible/modules/network/cumulus/_cl_img_install.py
index f44d718c70..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_img_install.py
+++ b/lib/ansible/modules/network/cumulus/_cl_img_install.py
@@ -9,100 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: cl_img_install
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Install a different Cumulus Linux version.
-deprecated:
- removed_in: "2.5"
- why: The image slot system no longer exists in Cumulus Linux.
- alternative: n/a
-description:
- - install a different version of Cumulus Linux in the inactive slot. For
- more details go the Image Management User Guide at
- U(http://docs.cumulusnetworks.com/).
-options:
- src:
- description:
- - The full path to the Cumulus Linux binary image. Can be a local path,
- http or https URL. If the code version is in the name of the file,
- the module will assume this is the version of code you wish to
- install.
- required: true
- version:
- description:
- - Inform the module of the exact version one is installing. This
- overrides the automatic check of version in the file name. For
- example, if the binary file name is called CumulusLinux-2.2.3.bin,
- and version is set to '2.5.0', then the module will assume it is
- installing '2.5.0' not '2.2.3'. If version is not included, then
- the module will assume '2.2.3' is the version to install.
- switch_slot:
- description:
- - Switch slots after installing the image.
- To run the installed code, reboot the switch.
- type: bool
-
-requirements: ["Cumulus Linux OS"]
-
-'''
-EXAMPLES = '''
-## Download and install the image from a webserver.
-- name: Install image using using http url. Switch slots so the subsequent will load the new version
- cl_img_install:
- version: 2.0.1
- src: http://10.1.1.1/CumulusLinux-2.0.1.bin
- switch_slot: yes
-
-## Copy the software from the ansible server to the switch.
-## The module will get the code version from the filename
-## The code will be installed in the alternate slot but the slot will not be primary
-## A subsequent reload will not run the new code
-
-- name: Download cumulus linux to local system
- get_url:
- src: ftp://cumuluslinux.bin
- dest: /root/CumulusLinux-2.0.1.bin
-
-- name: Install image from local filesystem. Get version from the filename.
- cl_img_install:
- src: /root/CumulusLinux-2.0.1.bin
-
-## If the image name has been changed from the original name, use the `version` option
-## to inform the module exactly what code version is been installed
-
-- name: Download cumulus linux to local system
- get_url:
- src: ftp://CumulusLinux-2.0.1.bin
- dest: /root/image.bin
-
-- name: install image and switch slots. Only reboot needed
- cl_img_install:
- version: 2.0.1
- src: /root/image.bin
- switch_slot: yes
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/cumulus/_cl_interface.py b/lib/ansible/modules/network/cumulus/_cl_interface.py
index 153529716e..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_interface.py
+++ b/lib/ansible/modules/network/cumulus/_cl_interface.py
@@ -9,203 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = r'''
----
-module: cl_interface
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Configures a front panel port, loopback or
- management port on Cumulus Linux.
-deprecated:
- removed_in: "2.5"
- why: The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way.
- alternative: Use M(nclu) instead.
-description:
- - Configures a front panel, sub-interface, SVI, management or loopback port
- on a Cumulus Linux switch. For bridge ports use the cl_bridge module. For
- bond ports use the cl_bond module. When configuring bridge related
- features like the "vid" option, please follow the guidelines for
- configuring "vlan aware" bridging. For more details review the Layer2
- Interface Guide at U(http://docs.cumulusnetworks.com)
-options:
- name:
- description:
- - Name of the interface.
- required: true
- alias_name:
- description:
- - Description of the port.
- ipv4:
- description:
- - List of IPv4 addresses to configure on the interface.
- In the form I(X.X.X.X/YY).
- ipv6:
- description:
- - List of IPv6 addresses to configure on the interface.
- In the form I(X:X:X::X/YYY).
- addr_method:
- description:
- - Address method.
- choices:
- - loopback
- - dhcp
- speed:
- description:
- - Set speed of the swp(front panel) or management(eth0) interface.
- speed is in MB.
- mtu:
- description:
- - Set MTU. Configure Jumbo Frame by setting MTU to I(9000).
- virtual_ip:
- description:
- - Define IPv4 virtual IP used by the Cumulus Linux VRR feature.
- virtual_mac:
- description:
- - Define Ethernet mac associated with Cumulus Linux VRR feature.
- vids:
- description:
- - In vlan-aware mode, lists VLANs defined under the interface.
- mstpctl_bpduguard:
- description:
- - Enables BPDU Guard on a port in vlan-aware mode.
- mstpctl_portnetwork:
- description:
- - Enables bridge assurance in vlan-aware mode.
- mstpctl_portadminedge:
- description:
- - Enables admin edge port.
- clagd_enable:
- description:
- - Enables the clagd daemon. This command should only be applied to
- the clag peerlink interface.
- clagd_priority:
- description:
- - Integer that changes the role the switch has in the clag domain.
- The lower priority switch will assume the primary role. The number
- can be between 0 and 65535.
- clagd_peer_ip:
- description:
- - IP address of the directly connected peer switch interface.
- clagd_sys_mac:
- description:
- - Clagd system mac address. Recommended to use the range starting
- with 44:38:39:ff. Needs to be the same between 2 Clag switches.
- pvid:
- description:
- - In vlan-aware mode, defines vlan that is the untagged vlan.
- location:
- description:
- - Interface directory location
- default:
- - '/etc/network/interfaces.d'
-
-requirements: [ Alternate Debian network interface manager - \
-ifupdown2 @ github.com/CumulusNetworks/ifupdown2 ]
-notes:
- - As this module writes the interface directory location, ensure that
- ``/etc/network/interfaces`` has a 'source /etc/network/interfaces.d/\*' or
- whatever path is mentioned in the ``location`` attribute.
-
- - For the config to be activated, i.e installed in the kernel,
- "service networking reload" needs be be executed. See EXAMPLES section.
-'''
-
-EXAMPLES = '''
-# Options ['virtual_mac', 'virtual_ip'] are required together
-- name: Configure a front panel port with an IP
- cl_interface:
- name: swp1
- ipv4: 10.1.1.1/24
- notify: reload networking
-
-- name: Configure front panel to use DHCP
- cl_interface:
- name: swp2
- addr_family: dhcp
- notify: reload networking
-
-- name: Configure a SVI for vlan 100 interface with an IP
- cl_interface:
- name: bridge.100
- ipv4: 10.1.1.1/24
- notify: reload networking
-
-- name: Configure subinterface with an IP
- cl_interface:
- name: bond0.100
- alias_name: my bond
- ipv4: 10.1.1.1/24
- notify: reload networking
-
-# define cl_interfaces once in tasks
-# then write interfaces in variables file
-# with just the options you want.
-- name: Create interfaces
- cl_interface:
- name: '{{ item.key }}'
- ipv4: '{{ item.value.ipv4 | default(omit) }}'
- ipv6: '{{ item.value.ipv6 | default(omit) }}'
- alias_name: '{{ item.value.alias_name | default(omit) }}'
- addr_method: '{{ item.value.addr_method | default(omit) }}'
- speed: '{{ item.value.link_speed | default(omit) }}'
- mtu: '{{ item.value.mtu | default(omit) }}'
- clagd_enable: '{{ item.value.clagd_enable | default(omit) }}'
- clagd_peer_ip: '{{ item.value.clagd_peer_ip | default(omit) }}'
- clagd_sys_mac: '{{ item.value.clagd_sys_mac | default(omit) }}'
- clagd_priority: '{{ item.value.clagd_priority | default(omit) }}'
- vids: '{{ item.value.vids | default(omit) }}'
- virtual_ip: '{{ item.value.virtual_ip | default(omit) }}'
- virtual_mac: '{{ item.value.virtual_mac | default(omit) }}'
- mstpctl_portnetwork: "{{ item.value.mstpctl_portnetwork | default('no') }}"
- mstpctl_portadminedge: "{{ item.value.mstpctl_portadminedge | default('no') }}"
- mstpctl_bpduguard: "{{ item.value.mstpctl_bpduguard | default('no') }}"
- with_dict: '{{ cl_interfaces }}'
- notify: reload networking
-
-# In vars file
-# ============
----
-cl_interfaces:
- swp1:
- alias_name: uplink to isp
- ipv4: 10.1.1.1/24
- swp2:
- alias_name: l2 trunk connection
- vids:
- - 1
- - 50
- swp3:
- speed: 1000
- alias_name: connects to 1G link
-##########
-# br0 interface is configured by cl_bridge
-##########
- br0.100:
- alias_name: SVI for vlan 100
- ipv4: 10.2.2.2/24
- ipv6: '10:2:2::2/127'
- virtual_ip: 10.2.2.254
- virtual_mac: 00:00:5E:00:10:10
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/cumulus/_cl_interface_policy.py b/lib/ansible/modules/network/cumulus/_cl_interface_policy.py
index e1049cfc01..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_interface_policy.py
+++ b/lib/ansible/modules/network/cumulus/_cl_interface_policy.py
@@ -9,66 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: cl_interface_policy
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Configure interface enforcement policy on Cumulus Linux
-deprecated:
- removed_in: "2.5"
- why: The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way.
- alternative: Use M(nclu) instead.
-description:
- - This module affects the configuration files located in the interfaces
- folder defined by ifupdown2. Interfaces port and port ranges listed in the
- "allowed" parameter define what interfaces will be available on the
- switch. If the user runs this module and has an interface configured on
- the switch, but not found in the "allowed" list, this interface will be
- unconfigured. By default this is `/etc/network/interface.d`
- For more details go the Configuring Interfaces at
- U(http://docs.cumulusnetworks.com).
-notes:
- - lo must be included in the allowed list.
- - eth0 must be in allowed list if out of band management is done
-options:
- allowed:
- description:
- - List of ports to run initial run at 10G.
- required: true
- location:
- description:
- - Directory to store interface files.
- default: '/etc/network/interfaces.d/'
-'''
-
-EXAMPLES = '''
-# Example playbook entries using the cl_interface_policy module.
-
- - name: shows types of interface ranges supported
- cl_interface_policy:
- allowed: "lo eth0 swp1-9, swp11, swp12-13s0, swp12-30s1, swp12-30s2, bond0-12"
-
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/cumulus/_cl_license.py b/lib/ansible/modules/network/cumulus/_cl_license.py
index d88d4ad9e1..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_license.py
+++ b/lib/ansible/modules/network/cumulus/_cl_license.py
@@ -9,101 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: cl_license
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Install licenses for Cumulus Linux
-deprecated:
- why: The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way.
- removed_in: "2.5"
- alternative: Use M(nclu) instead.
-description:
- - Installs a Cumulus Linux license. The module reports no change of status
- when a license is installed.
- For more details go the Cumulus Linux License Documentation at
- U(http://docs.cumulusnetwork.com) and the Licensing KB Site at
- U(https://support.cumulusnetworks.com/hc/en-us/sections/200507688)
-notes:
- - To activate a license for the FIRST time, the switchd service must be
- restarted. This action is disruptive. The license renewal process occurs
- via the Cumulus Networks Customer Portal -
- U(http://customers.cumulusnetworks.com).
- - A non-EULA license is REQUIRED for automation. Manually install the
- license on a test switch, using the command "cl-license -i "
- to confirm the license is a Non-EULA license.
- See EXAMPLES, for the proper way to issue this notify action.
-options:
- src:
- description:
- - The full path to the license. Can be local path or HTTP URL.
- required: true
- force:
- description:
- - Force installation of a license. Typically not needed.
- It is recommended to manually run this command via the ansible
- command. A reload of switchd is not required. Running the force
- option in a playbook will break the idempotent state machine of
- the module and cause the switchd notification to kick in all the
- time, causing a disruption.
- choices:
- - yes
- - no
-
-'''
-EXAMPLES = '''
-# Example playbook using the cl_license module to manage licenses on Cumulus Linux
-
-- hosts: all
- tasks:
- - name: install license using http url
- cl_license:
- src: http://10.1.1.1/license.txt
- notify: restart switchd
-
- - name: Triggers switchd to be restarted right away, before play, or role
- is over. This is desired behaviour
- meta: flush_handlers
-
- - name: Configure interfaces
- template:
- src: interfaces.j2
- dest: /etc/network/interfaces
- notify: restart networking
-
- handlers:
- - name: restart switchd
- service:
- name: switchd
- state: restarted
- - name: restart networking
- service:
- name: networking
- state: reloaded
-
-# Force all switches to accept a new license. Typically not needed
-# ansible -m cl_license -a "src='http://10.1.1.1/new_lic' force=yes" -u root all
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/cumulus/_cl_ports.py b/lib/ansible/modules/network/cumulus/_cl_ports.py
index e1bf209343..97edff7659 100644
--- a/lib/ansible/modules/network/cumulus/_cl_ports.py
+++ b/lib/ansible/modules/network/cumulus/_cl_ports.py
@@ -9,79 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: cl_ports
-version_added: "2.1"
-author: "Cumulus Networks (@CumulusNetworks)"
-short_description: Configure Cumulus Switch port attributes (ports.conf)
-deprecated:
- removed_in: "2.5"
- why: The M(nclu) module is designed to be easier to use for individuals who are new to Cumulus Linux by exposing the NCLU interface in an automatable way.
- alternative: Use M(nclu) instead.
-description:
- - Set the initial port attribute defined in the Cumulus Linux ports.conf,
- file. This module does not do any error checking at the moment. Be careful
- to not include ports that do not exist on the switch. Carefully read the
- original ports.conf file for any exceptions or limitations.
- For more details go the Configure Switch Port Attribute Documentation at
- U(http://docs.cumulusnetworks.com).
-options:
- speed_10g:
- description:
- - List of ports to run initial run at 10G.
- speed_40g:
- description:
- - List of ports to run initial run at 40G.
- speed_4_by_10g:
- description:
- - List of 40G ports that will be unganged to run as 4 10G ports.
- speed_40g_div_4:
- description:
- - List of 10G ports that will be ganged to form a 40G port.
-'''
-EXAMPLES = '''
-# Use cl_ports module to manage the switch attributes defined in the
-# ports.conf file on Cumulus Linux
-
-## Unganged port configuration on certain ports
-- name: configure ports.conf setup
- cl_ports:
- speed_4_by_10g:
- - swp1
- - swp32
- speed_40g:
- - swp2-31
-
-## Unganged port configuration on certain ports
-- name: configure ports.conf setup
- cl_ports:
- speed_4_by_10g:
- - swp1-3
- - swp6
- speed_40g:
- - swp4-5
- - swp7-32
-'''
-
-RETURN = '''
-changed:
- description: whether the interface was changed
- returned: changed
- type: bool
- sample: True
-msg:
- description: human-readable report of success or failure
- returned: always
- type: string
- sample: "interface bond0 config updated"
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/network/nxos/_nxos_mtu.py b/lib/ansible/modules/network/nxos/_nxos_mtu.py
index 5fb069e765..8542647f20 100644
--- a/lib/ansible/modules/network/nxos/_nxos_mtu.py
+++ b/lib/ansible/modules/network/nxos/_nxos_mtu.py
@@ -17,108 +17,12 @@
#
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'network'}
-DOCUMENTATION = '''
----
-module: nxos_mtu
-extends_documentation_fragment: nxos
-version_added: "2.2"
-deprecated:
- removed_in: "2.5"
- why: Replaced with common C(*_system) network modules.
- alternative: Use M(nxos_system)'s C(system_mtu) option. To specify an interfaces MTU use M(nxos_interface).
-short_description: Manages MTU settings on Nexus switch.
-description:
- - Manages MTU settings on Nexus switch.
-author:
- - Jason Edelman (@jedelman8)
-notes:
- - Tested against NXOSv 7.3.(0)D1(1) on VIRL
- - Either C(sysmtu) param is required or (C(interface) AND C(mtu)) parameters are required.
- - C(state=absent) unconfigures a given MTU if that value is currently present.
-options:
- interface:
- description:
- - Full name of interface, i.e. Ethernet1/1.
- mtu:
- description:
- - MTU for a specific interface. Must be an even number between 576 and 9216.
- sysmtu:
- description:
- - System jumbo MTU. Must be an even number between 576 and 9216.
- state:
- description:
- - Specify desired state of the resource.
- default: present
- choices: ['present','absent']
-'''
-
-EXAMPLES = '''
-# Ensure system mtu is 9126
-- nxos_mtu:
- sysmtu: 9216
- host: "{{ inventory_hostname }}"
- username: "{{ un }}"
- password: "{{ pwd }}"
-
-# Config mtu on Eth1/1 (routed interface)
-- nxos_mtu:
- interface: Ethernet1/1
- mtu: 1600
- host: "{{ inventory_hostname }}"
- username: "{{ un }}"
- password: "{{ pwd }}"
-
-# Config mtu on Eth1/3 (switched interface)
-- nxos_mtu:
- interface: Ethernet1/3
- mtu: 9216
- host: "{{ inventory_hostname }}"
- username: "{{ un }}"
- password: "{{ pwd }}"
-
-# Unconfigure mtu on a given interface
-- nxos_mtu:
- interface: Ethernet1/3
- mtu: 9216
- host: "{{ inventory_hostname }}"
- username: "{{ un }}"
- password: "{{ pwd }}"
- state: absent
-'''
-
-RETURN = '''
-proposed:
- description: k/v pairs of parameters passed into module
- returned: always
- type: dict
- sample: {"mtu": "1700"}
-existing:
- description:
- - k/v pairs of existing mtu/sysmtu on the interface/system
- returned: always
- type: dict
- sample: {"mtu": "1600", "sysmtu": "9216"}
-end_state:
- description: k/v pairs of mtu/sysmtu values after module execution
- returned: always
- type: dict
- sample: {"mtu": "1700", sysmtu": "9216"}
-updates:
- description: command sent to the device
- returned: always
- type: list
- sample: ["interface vlan10", "mtu 1700"]
-changed:
- description: check to see if a change was made on the device
- returned: always
- type: boolean
- sample: true
-'''
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.5")
diff --git a/lib/ansible/modules/utilities/helper/_accelerate.py b/lib/ansible/modules/utilities/helper/_accelerate.py
index e0fbe8c068..0d6e4347e9 100644
--- a/lib/ansible/modules/utilities/helper/_accelerate.py
+++ b/lib/ansible/modules/utilities/helper/_accelerate.py
@@ -9,79 +9,12 @@ __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['removed'],
'supported_by': 'community'}
-DOCUMENTATION = '''
----
-module: accelerate
-short_description: Enable accelerated mode on remote node
-deprecated:
- removed_in: "2.4"
- why: Replaced by ControlPersist
- alternative: Use SSH with ControlPersist instead.
- removed: True
-description:
- - This module has been removed, this file is kept for historical documentation purposes.
- - This modules launches an ephemeral I(accelerate) daemon on the remote node which
- Ansible can use to communicate with nodes at high speed.
- - The daemon listens on a configurable port for a configurable amount of time.
- - Fireball mode is AES encrypted
-version_added: "1.3"
-options:
- port:
- description:
- - TCP port for the socket connection
- required: false
- default: 5099
- aliases: []
- timeout:
- description:
- - The number of seconds the socket will wait for data. If none is received when the timeout value is reached, the connection will be closed.
- required: false
- default: 300
- aliases: []
- minutes:
- description:
- - The I(accelerate) listener daemon is started on nodes and will stay around for
- this number of minutes before turning itself off.
- required: false
- default: 30
- ipv6:
- description:
- - The listener daemon on the remote host will bind to the ipv6 localhost socket
- if this parameter is set to true.
- required: false
- default: false
- multi_key:
- description:
- - When enabled, the daemon will open a local socket file which can be used by future daemon executions to
- upload a new key to the already running daemon, so that multiple users can connect using different keys.
- This access still requires an ssh connection as the uid for which the daemon is currently running.
- required: false
- default: no
- version_added: "1.6"
-notes:
- - See the advanced playbooks chapter for more about using accelerated mode.
-requirements:
- - "python >= 2.4"
- - "python-keyczar"
-author: "James Cammarata (@jimi-c)"
-'''
-
-EXAMPLES = '''
-# To use accelerate mode, simply add "accelerate: true" to your play. The initial
-# key exchange and starting up of the daemon will occur over SSH, but all commands and
-# subsequent actions will be conducted over the raw socket connection using AES encryption
-
-- hosts: devservers
- accelerate: true
- tasks:
- - command: /usr/bin/anything
-'''
-
from ansible.module_utils.common.removed import removed_module
+
if __name__ == '__main__':
- removed_module()
+ removed_module(removed_in="2.4")
diff --git a/lib/ansible/modules/utilities/logic/include.py b/lib/ansible/modules/utilities/logic/include.py
index 076a342898..947b040939 100644
--- a/lib/ansible/modules/utilities/logic/include.py
+++ b/lib/ansible/modules/utilities/logic/include.py
@@ -9,7 +9,7 @@ __metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
- 'status': ['deprecated'],
+ 'status': ['preview'],
'supported_by': 'core'
}