mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Clean up deprecations (#504)
* Adjust deprecation versions. * Remove redirects that are already made in ansible/ansible's ansible_builtin_runtime.yml * Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml. * The _info module is in google.cloud. * The gcp doc_fragment is a copy of the one in google.cloud and is only used by one lookup. Mark as deprecated/internal. * Remove entries of modules that no longer exist. * Update ignore.txt. * Try to fix test. * Remove debug output.
This commit is contained in:
parent
5324b98e8f
commit
b54ddaa28c
152 changed files with 647 additions and 2628 deletions
472
meta/runtime.yml
472
meta/runtime.yml
|
@ -60,673 +60,401 @@ plugin_routing:
|
|||
modules:
|
||||
ali_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_account_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_certificate_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_firewall_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_floating_ip_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_load_balancer_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_region_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_size_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_snapshot_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_sshkey_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_tag_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
digital_ocean_volume_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
docker_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
docker_service:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcdns_record:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcdns_zone:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gce:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_backend_service:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_bigquery_dataset_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_bigquery_table_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_cloudbuild_trigger_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_address_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_backend_bucket_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_backend_service_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_disk_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_firewall_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_forwarding_rule_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_global_address_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_global_forwarding_rule_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_health_check_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_http_health_check_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_https_health_check_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_group_manager_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_instance_template_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_interconnect_attachment_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_region_disk_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_route_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_router_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_ssl_certificate_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_ssl_policy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_subnetwork_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_http_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_https_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_pool_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_ssl_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_tcp_proxy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_target_vpn_gateway_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_url_map_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_compute_vpn_tunnel_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_container_cluster_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_container_node_pool_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_dns_managed_zone_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_dns_resource_record_set_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_forwarding_rule:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_healthcheck:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_iam_role_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_iam_service_account_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_pubsub_subscription_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_pubsub_topic_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_redis_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_resourcemanager_project_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sourcerepo_repository_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_spanner_database_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_spanner_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sql_database_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sql_instance_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_sql_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_target_proxy:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_tpu_node_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcp_url_map:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcpubsub_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
gcspanner:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
helm:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: The helm module in community.general has been deprecated. Use community.kubernetes.helm instead.
|
||||
memset_memstore_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
memset_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
online_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
online_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
one_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_flavor_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_keystone_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_networks_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_port_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_project_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_subnets_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
os_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_affinity_label_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_api_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_cluster_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_datacenter_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_disk_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_event_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_external_provider_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_host_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_host_storage_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_nic_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_permission_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_quota_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_scheduling_policy_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_snapshot_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_domain_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_template_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_storage_vm_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_tag_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_template_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_user_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_vm_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ovirt_vmpool_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_ip_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_organization_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_security_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_server_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_snapshot_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
scaleway_volume_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
smartos_image_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
xenserver_guest_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
vertica_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
onepassword_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
ldap_attr:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
osx_say:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
foreman:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
katello:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hpilo_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_datacenter_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_enclosure_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_ethernet_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_fc_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_fcoe_network_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_logical_interconnect_group_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_network_set_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
oneview_san_manager_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
idrac_redfish_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
redfish_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
github_hooks:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
github_webhook_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gitlab_hooks:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
warning_text: see plugin documentation for details
|
||||
gluster_heal_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_aggregate:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_license:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_lun:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_qtree:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_svm:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_user:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_user_role:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_cdot_volume:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
na_ontap_gather_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_account_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_check_connections:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_snapshot_schedule_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_volume_access_group_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
sf_volume_manager:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
purefa_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
purefb_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
python_requirements_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
jenkins_job_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
nginx_status_facts:
|
||||
deprecation:
|
||||
removal_date: TBD
|
||||
removal_version: 3.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
|
|
3
plugins/cache/memcached.py
vendored
3
plugins/cache/memcached.py
vendored
|
@ -179,7 +179,8 @@ class CacheModule(BaseCacheModule):
|
|||
self._prefix = self.get_option('_prefix')
|
||||
except KeyError:
|
||||
display.deprecated('Rather than importing CacheModules directly, '
|
||||
'use ansible.plugins.loader.cache_loader', version='2.12')
|
||||
'use ansible.plugins.loader.cache_loader',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
if C.CACHE_PLUGIN_CONNECTION:
|
||||
connection = C.CACHE_PLUGIN_CONNECTION.split(',')
|
||||
self._timeout = C.CACHE_PLUGIN_TIMEOUT
|
||||
|
|
3
plugins/cache/redis.py
vendored
3
plugins/cache/redis.py
vendored
|
@ -79,7 +79,8 @@ class CacheModule(BaseCacheModule):
|
|||
self._prefix = self.get_option('_prefix')
|
||||
except KeyError:
|
||||
display.deprecated('Rather than importing CacheModules directly, '
|
||||
'use ansible.plugins.loader.cache_loader', version='2.12')
|
||||
'use ansible.plugins.loader.cache_loader',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
if C.CACHE_PLUGIN_CONNECTION:
|
||||
uri = C.CACHE_PLUGIN_CONNECTION
|
||||
self._timeout = float(C.CACHE_PLUGIN_TIMEOUT)
|
||||
|
|
|
@ -15,7 +15,7 @@ DOCUMENTATION = '''
|
|||
- This callback suppresses any non Failed or Changed status.
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_in: '2.0.0' # was Ansible 2.11
|
||||
alternative: "'default' callback plugin with 'display_skipped_hosts = no' and 'display_ok_hosts = no' options"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
|
@ -32,7 +32,7 @@ DOCUMENTATION = '''
|
|||
- name: DISPLAY_SKIPPED_HOSTS
|
||||
deprecated:
|
||||
why: environment variables without "ANSIBLE_" prefix are deprecated
|
||||
version: "2.12"
|
||||
version: "2.0.0" # was Ansible 2.12
|
||||
alternatives: the "ANSIBLE_DISPLAY_SKIPPED_HOSTS" environment variable
|
||||
- name: ANSIBLE_DISPLAY_SKIPPED_HOSTS
|
||||
ini:
|
||||
|
|
|
@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
|||
- Use this plugin when you do not care about any output for tasks that were completely skipped
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_in: '2.0.0' # was Ansible 2.11
|
||||
alternative: "'default' callback plugin with 'display_skipped_hosts = no' option"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
|
|
|
@ -14,7 +14,7 @@ DOCUMENTATION = '''
|
|||
short_description: Splits output, sending failed tasks to stderr
|
||||
deprecated:
|
||||
why: The 'default' callback plugin now supports this functionality
|
||||
removed_in: '2.11'
|
||||
removed_in: '2.0.0' # was Ansible 2.11
|
||||
alternative: "'default' callback plugin with 'display_failed_stderr = yes' option"
|
||||
extends_documentation_fragment:
|
||||
- default_callback
|
||||
|
|
|
@ -24,7 +24,7 @@ options:
|
|||
- The name of the bucket.
|
||||
required: false
|
||||
extends_documentation_fragment:
|
||||
- community.general.gcp
|
||||
- community.general._gcp
|
||||
|
||||
'''
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ class RedfishUtils(object):
|
|||
'msg': "System resource %s not found" % self.resource_id}
|
||||
elif len(self.systems_uris) > 1:
|
||||
self.module.deprecate(DEPRECATE_MSG % {'resource': 'System'},
|
||||
version='2.14')
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.14
|
||||
return {'ret': True}
|
||||
|
||||
def _find_updateservice_resource(self):
|
||||
|
@ -296,7 +296,7 @@ class RedfishUtils(object):
|
|||
'msg': "Chassis resource %s not found" % self.resource_id}
|
||||
elif len(self.chassis_uris) > 1:
|
||||
self.module.deprecate(DEPRECATE_MSG % {'resource': 'Chassis'},
|
||||
version='2.14')
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.14
|
||||
return {'ret': True}
|
||||
|
||||
def _find_managers_resource(self):
|
||||
|
@ -326,7 +326,7 @@ class RedfishUtils(object):
|
|||
'msg': "Manager resource %s not found" % self.resource_id}
|
||||
elif len(self.manager_uris) > 1:
|
||||
self.module.deprecate(DEPRECATE_MSG % {'resource': 'Manager'},
|
||||
version='2.14')
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.14
|
||||
return {'ret': True}
|
||||
|
||||
def _get_all_action_info_values(self, action):
|
||||
|
|
|
@ -384,7 +384,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('ali_instance_facts', 'community.general.ali_instance_facts'):
|
||||
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'", version='2.13')
|
||||
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
if HAS_FOOTMARK is False:
|
||||
module.fail_json(msg=missing_required_lib('footmark'), exception=FOOTMARK_IMP_ERR)
|
||||
|
|
|
@ -29,7 +29,7 @@ options:
|
|||
choices: ['present','absent']
|
||||
wait:
|
||||
description:
|
||||
- This option does nothing and will be removed in Ansible 2.14.
|
||||
- This option does nothing and will be removed in community.general 3.0.0.
|
||||
type: bool
|
||||
requirements:
|
||||
- python = 2.7
|
||||
|
@ -183,7 +183,7 @@ class ClcAntiAffinityPolicy:
|
|||
argument_spec = dict(
|
||||
name=dict(required=True),
|
||||
location=dict(required=True),
|
||||
wait=dict(type='bool', removed_in_version='2.14'),
|
||||
wait=dict(type='bool', removed_in_version='3.0.0', removed_from_collection='community.general'), # was Ansible 2.14
|
||||
state=dict(default='present', choices=['present', 'absent']),
|
||||
)
|
||||
return argument_spec
|
||||
|
|
|
@ -93,7 +93,7 @@ options:
|
|||
description:
|
||||
- UUID of another server to create an anti-affinity group with.
|
||||
- Mutually exclusive with I(server_groups).
|
||||
- Deprecated, removed in version 2.11.
|
||||
- Deprecated, removed in community.general 2.0.0.
|
||||
type: str
|
||||
server_groups:
|
||||
description:
|
||||
|
@ -245,7 +245,7 @@ ssh_host_keys:
|
|||
anti_affinity_with:
|
||||
description:
|
||||
- List of servers in the same anti-affinity group
|
||||
- Deprecated, removed in version 2.11.
|
||||
- Deprecated, removed in community.general 2.0.0.
|
||||
returned: success when not state == absent
|
||||
type: list
|
||||
sample: []
|
||||
|
@ -521,7 +521,7 @@ def main():
|
|||
use_public_network=dict(type='bool', default=True),
|
||||
use_private_network=dict(type='bool', default=False),
|
||||
use_ipv6=dict(type='bool', default=True),
|
||||
anti_affinity_with=dict(removed_in_version='2.11'),
|
||||
anti_affinity_with=dict(removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.11
|
||||
server_groups=dict(type='list'),
|
||||
user_data=dict(),
|
||||
force=dict(type='bool', default=False),
|
||||
|
|
|
@ -13,7 +13,7 @@ DOCUMENTATION = '''
|
|||
module: digital_ocean
|
||||
short_description: Create/delete a droplet/SSH_key in DigitalOcean
|
||||
deprecated:
|
||||
removed_in: '2.12'
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated module to remove external dependency with increased functionality.
|
||||
alternative: Use M(digital_ocean_droplet) instead.
|
||||
description:
|
||||
|
|
|
@ -69,7 +69,8 @@ def main():
|
|||
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_account_facts', 'community.general.digital_ocean_account_facts'):
|
||||
module.deprecate("The 'digital_ocean_account_facts' module has been renamed to 'digital_ocean_account_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_account_facts' module has been renamed to 'digital_ocean_account_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
try:
|
||||
core(module)
|
||||
except Exception as e:
|
||||
|
|
|
@ -100,7 +100,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_certificate_facts', 'community.general.digital_ocean_certificate_facts'):
|
||||
module.deprecate("The 'digital_ocean_certificate_facts' module has been renamed to 'digital_ocean_certificate_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_certificate_facts' module has been renamed to 'digital_ocean_certificate_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -125,7 +125,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_domain_facts', 'community.general.digital_ocean_domain_facts'):
|
||||
module.deprecate("The 'digital_ocean_domain_facts' module has been renamed to 'digital_ocean_domain_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_domain_facts' module has been renamed to 'digital_ocean_domain_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -118,7 +118,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_firewall_facts', 'community.general.digital_ocean_firewall_facts'):
|
||||
module.deprecate("The 'digital_ocean_firewall_facts' module has been renamed to 'digital_ocean_firewall_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_firewall_facts' module has been renamed to 'digital_ocean_firewall_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -106,7 +106,8 @@ def main():
|
|||
argument_spec=DigitalOceanHelper.digital_ocean_argument_spec()
|
||||
)
|
||||
if module._name in ('digital_ocean_floating_ip_facts', 'community.general.digital_ocean_floating_ip_facts'):
|
||||
module.deprecate("The 'digital_ocean_floating_ip_facts' module has been renamed to 'digital_ocean_floating_ip_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_floating_ip_facts' module has been renamed to 'digital_ocean_floating_ip_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -135,7 +135,8 @@ def main():
|
|||
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_image_facts', 'community.general.digital_ocean_image_facts'):
|
||||
module.deprecate("The 'digital_ocean_image_facts' module has been renamed to 'digital_ocean_image_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_image_facts' module has been renamed to 'digital_ocean_image_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -102,7 +102,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_load_balancer_facts', 'community.general.digital_ocean_load_balancer_facts'):
|
||||
module.deprecate("The 'digital_ocean_load_balancer_facts' module has been renamed to 'digital_ocean_load_balancer_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_load_balancer_facts' module has been renamed to 'digital_ocean_load_balancer_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -102,7 +102,8 @@ def main():
|
|||
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_region_facts', 'community.general.digital_ocean_region_facts'):
|
||||
module.deprecate("The 'digital_ocean_region_facts' module has been renamed to 'digital_ocean_region_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_region_facts' module has been renamed to 'digital_ocean_region_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -100,7 +100,8 @@ def main():
|
|||
argument_spec=argument_spec,
|
||||
)
|
||||
if module._name in ('digital_ocean_size_facts', 'community.general.digital_ocean_size_facts'):
|
||||
module.deprecate("The 'digital_ocean_size_facts' module has been renamed to 'digital_ocean_size_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_size_facts' module has been renamed to 'digital_ocean_size_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -147,7 +147,8 @@ def main():
|
|||
],
|
||||
)
|
||||
if module._name in ('digital_ocean_snapshot_facts', 'community.general.digital_ocean_snapshot_facts'):
|
||||
module.deprecate("The 'digital_ocean_snapshot_facts' module has been renamed to 'digital_ocean_snapshot_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_snapshot_facts' module has been renamed to 'digital_ocean_snapshot_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -13,7 +13,7 @@ DOCUMENTATION = '''
|
|||
---
|
||||
module: digital_ocean_sshkey_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(digital_ocean_sshkey_info) instead.
|
||||
short_description: DigitalOcean SSH keys facts
|
||||
|
@ -91,7 +91,8 @@ def main():
|
|||
supports_check_mode=False,
|
||||
)
|
||||
|
||||
module.deprecate("The 'digital_ocean_sshkey_facts' module has been deprecated, use the new 'digital_ocean_sshkey_info' module", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_sshkey_facts' module has been deprecated, use the new 'digital_ocean_sshkey_info' module",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
core(module)
|
||||
|
||||
|
|
|
@ -102,7 +102,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_tag_facts', 'community.general.digital_ocean_tag_facts'):
|
||||
module.deprecate("The 'digital_ocean_tag_facts' module has been renamed to 'digital_ocean_tag_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_tag_facts' module has been renamed to 'digital_ocean_tag_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -127,7 +127,8 @@ def main():
|
|||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
if module._name in ('digital_ocean_volume_facts', 'community.general.digital_ocean_volume_facts'):
|
||||
module.deprecate("The 'digital_ocean_volume_facts' module has been renamed to 'digital_ocean_volume_info'", version='2.13')
|
||||
module.deprecate("The 'digital_ocean_volume_facts' module has been renamed to 'digital_ocean_volume_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
try:
|
||||
core(module)
|
||||
|
|
|
@ -308,7 +308,7 @@ services:
|
|||
- A dictionary mapping the service's name to a dictionary of containers.
|
||||
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
|
||||
are also accessible directly. The service's name is the variable with which the container dictionary
|
||||
can be accessed. Note that the returned facts will be removed in Ansible 2.12.
|
||||
can be accessed. Note that the returned facts will be removed in community.general 2.0.0.
|
||||
returned: success
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -1136,7 +1136,8 @@ def main():
|
|||
min_docker_api_version='1.20',
|
||||
)
|
||||
if client.module._name in ('docker_service', 'community.general.docker_service'):
|
||||
client.module.deprecate("The 'docker_service' module has been renamed to 'docker_compose'.", version='2.12')
|
||||
client.module.deprecate("The 'docker_service' module has been renamed to 'docker_compose'.",
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
|
||||
try:
|
||||
result = ContainerManager(client).exec_module()
|
||||
|
|
|
@ -29,7 +29,7 @@ notes:
|
|||
these options, it will be recreated instead. The options with default values which can cause this are I(auto_remove),
|
||||
I(detach), I(init), I(interactive), I(memory), I(paused), I(privileged), I(read_only) and I(tty). This behavior
|
||||
can be changed by setting I(container_default_behavior) to C(no_defaults), which will be the default value from
|
||||
Ansible 2.14 on.
|
||||
community.general 3.0.0 on.
|
||||
|
||||
options:
|
||||
auto_remove:
|
||||
|
@ -89,7 +89,7 @@ options:
|
|||
containers which use different values for these options.
|
||||
- The default value is C(compatibility), which will ensure that the default values
|
||||
are used when the values are not explicitly specified by the user.
|
||||
- From Ansible 2.14 on, the default value will switch to C(no_defaults). To avoid
|
||||
- From community.general 3.0.0 on, the default value will switch to C(no_defaults). To avoid
|
||||
deprecation warnings, please set I(container_default_behavior) to an explicit
|
||||
value.
|
||||
- This affects the I(auto_remove), I(detach), I(init), I(interactive), I(memory),
|
||||
|
@ -508,7 +508,7 @@ options:
|
|||
network_mode:
|
||||
description:
|
||||
- Connect the container to a network. Choices are C(bridge), C(host), C(none), C(container:<name|id>), C(<network_name>) or C(default).
|
||||
- "*Note* that from Ansible 2.14 on, if I(networks_cli_compatible) is C(true) and I(networks) contains at least one network,
|
||||
- "*Note* that from community.general 3.0.0 on, if I(networks_cli_compatible) is C(true) and I(networks) contains at least one network,
|
||||
the default value for I(network_mode) will be the name of the first network in the I(networks) list. You can prevent this
|
||||
by explicitly specifying a value for I(network_mode), like the default value C(default) which will be used by Docker if
|
||||
I(network_mode) is not specified."
|
||||
|
@ -525,7 +525,7 @@ options:
|
|||
- Note that as opposed to C(docker run ...), M(docker_container) does not remove the default
|
||||
network if I(networks) is specified. You need to explicitly use I(purge_networks) to enforce
|
||||
the removal of the default network (and all other networks not explicitly mentioned in I(networks)).
|
||||
Alternatively, use the I(networks_cli_compatible) option, which will be enabled by default from Ansible 2.12 on.
|
||||
Alternatively, use the I(networks_cli_compatible) option, which will be enabled by default from community.general 2.0.0 on.
|
||||
type: list
|
||||
elements: dict
|
||||
suboptions:
|
||||
|
@ -567,11 +567,11 @@ options:
|
|||
- "*Note* that docker CLI also sets I(network_mode) to the name of the first network
|
||||
added if C(--network) is specified. For more compatibility with docker CLI, you
|
||||
explicitly have to set I(network_mode) to the name of the first network you're
|
||||
adding. This behavior will change for Ansible 2.14: then I(network_mode) will
|
||||
adding. This behavior will change for community.general 3.0.0: then I(network_mode) will
|
||||
automatically be set to the first network name in I(networks) if I(network_mode)
|
||||
is not specified, I(networks) has at least one entry and I(networks_cli_compatible)
|
||||
is C(true)."
|
||||
- Current value is C(no). A new default of C(yes) will be set in Ansible 2.12.
|
||||
- Current value is C(no). A new default of C(yes) will be set in community.general 2.0.0.
|
||||
type: bool
|
||||
oom_killer:
|
||||
description:
|
||||
|
@ -618,7 +618,7 @@ options:
|
|||
container port, 9000 is a host port, and 0.0.0.0 is a host interface."
|
||||
- Port ranges can be used for source and destination ports. If two ranges with
|
||||
different lengths are specified, the shorter range will be used.
|
||||
Since Ansible 2.10, if the source port range has length 1, the port will not be assigned
|
||||
Since community.general 0.2.0, if the source port range has length 1, the port will not be assigned
|
||||
to the first port of the destination range, but to a free port in that range. This is the
|
||||
same behavior as for C(docker) command line utility.
|
||||
- "Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are *not* allowed. This
|
||||
|
@ -750,7 +750,7 @@ options:
|
|||
trust_image_content:
|
||||
description:
|
||||
- If C(yes), skip image verification.
|
||||
- The option has never been used by the module. It will be removed in Ansible 2.14.
|
||||
- The option has never been used by the module. It will be removed in community.general 3.0.0.
|
||||
type: bool
|
||||
default: no
|
||||
tmpfs:
|
||||
|
@ -1054,7 +1054,8 @@ container:
|
|||
description:
|
||||
- Facts representing the current state of the container. Matches the docker inspection output.
|
||||
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
|
||||
are also accessible directly as C(docker_container). Note that the returned fact will be removed in Ansible 2.12.
|
||||
are also accessible directly as C(docker_container). Note that the returned fact will be removed in
|
||||
community.general 2.0.0.
|
||||
- Before 2.3 this was C(ansible_docker_container) but was renamed in 2.3 to C(docker_container) due to
|
||||
conflicts with the connection plugin.
|
||||
- Empty if I(state) is C(absent)
|
||||
|
@ -3262,8 +3263,8 @@ class AnsibleDockerClientContainer(AnsibleDockerClient):
|
|||
self.module.params['container_default_behavior'] = 'compatibility'
|
||||
self.module.deprecate(
|
||||
'The container_default_behavior option will change its default value from "compatibility" to '
|
||||
'"no_defaults" in Ansible 2.14. To remove this warning, please specify an explicit value for it now',
|
||||
version='2.14'
|
||||
'"no_defaults" in community.general 3.0.0. To remove this warning, please specify an explicit value for it now',
|
||||
version='3.0.0', collection_name='community.general' # was Ansible 2.14
|
||||
)
|
||||
if self.module.params['container_default_behavior'] == 'compatibility':
|
||||
old_default_values = dict(
|
||||
|
@ -3400,7 +3401,8 @@ def main():
|
|||
stop_timeout=dict(type='int'),
|
||||
sysctls=dict(type='dict'),
|
||||
tmpfs=dict(type='list', elements='str'),
|
||||
trust_image_content=dict(type='bool', default=False, removed_in_version='2.14'),
|
||||
trust_image_content=dict(type='bool', default=False, removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
tty=dict(type='bool'),
|
||||
ulimits=dict(type='list', elements='str'),
|
||||
user=dict(type='str'),
|
||||
|
@ -3427,10 +3429,10 @@ def main():
|
|||
'Please note that docker_container handles networks slightly different than docker CLI. '
|
||||
'If you specify networks, the default network will still be attached as the first network. '
|
||||
'(You can specify purge_networks to remove all networks not explicitly listed.) '
|
||||
'This behavior will change in Ansible 2.12. You can change the behavior now by setting '
|
||||
'This behavior will change in community.general 2.0.0. You can change the behavior now by setting '
|
||||
'the new `networks_cli_compatible` option to `yes`, and remove this warning by setting '
|
||||
'it to `no`',
|
||||
version='2.12'
|
||||
version='2.0.0', collection_name='community.general', # was Ansible 2.12
|
||||
)
|
||||
if client.module.params['networks_cli_compatible'] is True and client.module.params['networks'] and client.module.params['network_mode'] is None:
|
||||
client.module.deprecate(
|
||||
|
@ -3442,7 +3444,7 @@ def main():
|
|||
'Please make sure that the value you set to `network_mode` equals the inspection result '
|
||||
'for existing containers, otherwise the module will recreate them. You can find out the '
|
||||
'correct value by running "docker inspect --format \'{{.HostConfig.NetworkMode}}\' <container_name>"',
|
||||
version='2.14'
|
||||
version='3.0.0', collection_name='community.general', # was Ansible 2.14
|
||||
)
|
||||
|
||||
try:
|
||||
|
|
|
@ -18,7 +18,7 @@ description:
|
|||
- Build, load or pull an image, making the image available for creating containers. Also supports tagging an
|
||||
image into a repository and archiving an image to a .tar file.
|
||||
- Since Ansible 2.8, it is recommended to explicitly specify the image's source (I(source) can be C(build),
|
||||
C(load), C(pull) or C(local)). This will be required from Ansible 2.12 on.
|
||||
C(load), C(pull) or C(local)). This will be required from community.general 2.0.0 on.
|
||||
|
||||
options:
|
||||
source:
|
||||
|
@ -31,9 +31,9 @@ options:
|
|||
- "Use C(pull) to pull the image from a registry."
|
||||
- "Use C(local) to make sure that the image is already available on the local
|
||||
docker daemon, i.e. do not try to build, pull or load the image."
|
||||
- "Before Ansible 2.12, the value of this option will be auto-detected
|
||||
- "Before community.general 2.0.0, the value of this option will be auto-detected
|
||||
to be backwards compatible, but a warning will be issued if it is not
|
||||
explicitly specified. From Ansible 2.12 on, auto-detection will be disabled
|
||||
explicitly specified. From community.general 2.0.0 on, auto-detection will be disabled
|
||||
and this option will be made mandatory."
|
||||
type: str
|
||||
choices:
|
||||
|
@ -70,7 +70,7 @@ options:
|
|||
pull:
|
||||
description:
|
||||
- When building an image downloads any updates to the FROM image in Dockerfile.
|
||||
- The default is currently C(yes). This will change to C(no) in Ansible 2.12.
|
||||
- The default is currently C(yes). This will change to C(no) in community.general 2.0.0.
|
||||
type: bool
|
||||
rm:
|
||||
description:
|
||||
|
@ -137,15 +137,15 @@ options:
|
|||
description:
|
||||
- Use with state C(present) to load an image from a .tar file.
|
||||
- Set I(source) to C(load) if you want to load the image. The option will
|
||||
be set automatically before Ansible 2.12 if this option is used (except
|
||||
be set automatically before community.general 2.0.0 if this option is used (except
|
||||
if I(path) is specified as well, in which case building will take precedence).
|
||||
From Ansible 2.12 on, you have to set I(source) to C(load).
|
||||
From community.general 2.0.0 on, you have to set I(source) to C(load).
|
||||
type: path
|
||||
dockerfile:
|
||||
description:
|
||||
- Use with state C(present) and source C(build) to provide an alternate name for the Dockerfile to use when building an image.
|
||||
- This can also include a relative path (relative to I(path)).
|
||||
- Please use I(build.dockerfile) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.dockerfile) instead. This option will be removed in community.general 2.0.0.
|
||||
type: str
|
||||
force:
|
||||
description:
|
||||
|
@ -154,7 +154,7 @@ options:
|
|||
to force tagging an image.
|
||||
- Please stop using this option, and use the more specialized force options
|
||||
I(force_source), I(force_absent) and I(force_tag) instead.
|
||||
- This option will be removed in Ansible 2.12.
|
||||
- This option will be removed in community.general 2.0.0.
|
||||
type: bool
|
||||
force_source:
|
||||
description:
|
||||
|
@ -176,7 +176,7 @@ options:
|
|||
description:
|
||||
- Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of
|
||||
seconds.
|
||||
- Please use I(build.http_timeout) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.http_timeout) instead. This option will be removed in community.general 2.0.0.
|
||||
type: int
|
||||
name:
|
||||
description:
|
||||
|
@ -190,17 +190,17 @@ options:
|
|||
- Use with state 'present' to build an image. Will be the path to a directory containing the context and
|
||||
Dockerfile for building an image.
|
||||
- Set I(source) to C(build) if you want to build the image. The option will
|
||||
be set automatically before Ansible 2.12 if this option is used. From Ansible 2.12
|
||||
be set automatically before community.general 2.0.0 if this option is used. From community.general 2.0.0
|
||||
on, you have to set I(source) to C(build).
|
||||
- Please use I(build.path) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.path) instead. This option will be removed in community.general 2.0.0.
|
||||
type: path
|
||||
aliases:
|
||||
- build_path
|
||||
pull:
|
||||
description:
|
||||
- When building an image downloads any updates to the FROM image in Dockerfile.
|
||||
- Please use I(build.pull) instead. This option will be removed in Ansible 2.12.
|
||||
- The default is currently C(yes). This will change to C(no) in Ansible 2.12.
|
||||
- Please use I(build.pull) instead. This option will be removed in community.general 2.0.0.
|
||||
- The default is currently C(yes). This will change to C(no) in community.general 2.0.0.
|
||||
type: bool
|
||||
push:
|
||||
description:
|
||||
|
@ -210,13 +210,13 @@ options:
|
|||
rm:
|
||||
description:
|
||||
- Remove intermediate containers after build.
|
||||
- Please use I(build.rm) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.rm) instead. This option will be removed in community.general 2.0.0.
|
||||
type: bool
|
||||
default: yes
|
||||
nocache:
|
||||
description:
|
||||
- Do not use cache when building an image.
|
||||
- Please use I(build.nocache) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.nocache) instead. This option will be removed in community.general 2.0.0.
|
||||
type: bool
|
||||
default: no
|
||||
repository:
|
||||
|
@ -232,11 +232,11 @@ options:
|
|||
- When C(present) check if an image exists using the provided name and tag. If the image is not found or the
|
||||
force option is used, the image will either be pulled, built or loaded, depending on the I(source) option.
|
||||
- By default the image will be pulled from Docker Hub, or the registry specified in the image's name. Note that
|
||||
this will change in Ansible 2.12, so to make sure that you are pulling, set I(source) to C(pull). To build
|
||||
this will change in community.general 2.0.0, so to make sure that you are pulling, set I(source) to C(pull). To build
|
||||
the image, provide a I(path) value set to a directory containing a context and Dockerfile, and set I(source)
|
||||
to C(build). To load an image, specify I(load_path) to provide a path to an archive file. To tag an image to
|
||||
a repository, provide a I(repository) path. If the name contains a repository path, it will be pushed.
|
||||
- "*Note:* C(state=build) is DEPRECATED and will be removed in Ansible 2.11. Specifying C(build) will behave the
|
||||
- "*Note:* C(state=build) is DEPRECATED and will be removed in community.general 2.0.0. Specifying C(build) will behave the
|
||||
same as C(present)."
|
||||
type: str
|
||||
default: present
|
||||
|
@ -256,12 +256,12 @@ options:
|
|||
- Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.
|
||||
- Docker expects the value to be a string. For convenience any non-string values will be converted to strings.
|
||||
- Requires Docker API >= 1.21.
|
||||
- Please use I(build.args) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.args) instead. This option will be removed in community.general 2.0.0.
|
||||
type: dict
|
||||
container_limits:
|
||||
description:
|
||||
- A dictionary of limits applied to each container created by the build process.
|
||||
- Please use I(build.container_limits) instead. This option will be removed in Ansible 2.12.
|
||||
- Please use I(build.container_limits) instead. This option will be removed in community.general 2.0.0.
|
||||
type: dict
|
||||
suboptions:
|
||||
memory:
|
||||
|
@ -287,7 +287,7 @@ options:
|
|||
the server's certificate is valid for the server."
|
||||
- "*Note:* If you specify this option, it will set the value of the I(tls) or
|
||||
I(validate_certs) parameters if not set to C(no)."
|
||||
- Will be removed in Ansible 2.11.
|
||||
- Will be removed in community.general 2.0.0.
|
||||
type: str
|
||||
choices:
|
||||
- 'no'
|
||||
|
@ -806,30 +806,31 @@ def main():
|
|||
memswap=dict(type='int'),
|
||||
cpushares=dict(type='int'),
|
||||
cpusetcpus=dict(type='str'),
|
||||
), removed_in_version='2.12'),
|
||||
dockerfile=dict(type='str', removed_in_version='2.12'),
|
||||
force=dict(type='bool', removed_in_version='2.12'),
|
||||
), removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
dockerfile=dict(type='str', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
force=dict(type='bool', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
force_source=dict(type='bool', default=False),
|
||||
force_absent=dict(type='bool', default=False),
|
||||
force_tag=dict(type='bool', default=False),
|
||||
http_timeout=dict(type='int', removed_in_version='2.12'),
|
||||
http_timeout=dict(type='int', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
load_path=dict(type='path'),
|
||||
name=dict(type='str', required=True),
|
||||
nocache=dict(type='bool', default=False, removed_in_version='2.12'),
|
||||
path=dict(type='path', aliases=['build_path'], removed_in_version='2.12'),
|
||||
pull=dict(type='bool', removed_in_version='2.12'),
|
||||
nocache=dict(type='bool', default=False, removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
path=dict(type='path', aliases=['build_path'], removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
pull=dict(type='bool', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
push=dict(type='bool', default=False),
|
||||
repository=dict(type='str'),
|
||||
rm=dict(type='bool', default=True, removed_in_version='2.12'),
|
||||
rm=dict(type='bool', default=True, removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
state=dict(type='str', default='present', choices=['absent', 'present', 'build']),
|
||||
tag=dict(type='str', default='latest'),
|
||||
use_tls=dict(type='str', choices=['no', 'encrypt', 'verify'], removed_in_version='2.11'),
|
||||
buildargs=dict(type='dict', removed_in_version='2.12'),
|
||||
use_tls=dict(type='str', choices=['no', 'encrypt', 'verify'], removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
buildargs=dict(type='dict', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
)
|
||||
|
||||
required_if = [
|
||||
# ('state', 'present', ['source']), -- enable in Ansible 2.12.
|
||||
# ('source', 'build', ['build']), -- enable in Ansible 2.12.
|
||||
# ('state', 'present', ['source']), -- enable in community.general 2.0.0
|
||||
# ('source', 'build', ['build']), -- enable in community.general 2.0.0
|
||||
('source', 'load', ['load_path']),
|
||||
]
|
||||
|
||||
|
@ -865,14 +866,14 @@ def main():
|
|||
)
|
||||
|
||||
if client.module.params['state'] == 'build':
|
||||
client.module.warn('The "build" state has been deprecated for a long time '
|
||||
'and will be removed in Ansible 2.11. Please use '
|
||||
'"present", which has the same meaning as "build".')
|
||||
client.module.deprecate('The "build" state has been deprecated for a long time. '
|
||||
'Please use "present", which has the same meaning as "build".',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.11
|
||||
client.module.params['state'] = 'present'
|
||||
if client.module.params['use_tls']:
|
||||
client.module.warn('The "use_tls" option has been deprecated for a long time '
|
||||
'and will be removed in Ansible 2.11. Please use the'
|
||||
'"tls" and "validate_certs" options instead.')
|
||||
client.module.deprecate('The "use_tls" option has been deprecated for a long time. '
|
||||
'Please use the "tls" and "validate_certs" options instead.',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.11
|
||||
|
||||
if not is_valid_tag(client.module.params['tag'], allow_empty=True):
|
||||
client.fail('"{0}" is not a valid docker tag!'.format(client.module.params['tag']))
|
||||
|
@ -899,35 +900,39 @@ def main():
|
|||
if client.module.params['build'].get(build_option, default_value) != default_value:
|
||||
client.fail('Cannot specify both %s and build.%s!' % (option, build_option))
|
||||
client.module.params['build'][build_option] = client.module.params[option]
|
||||
client.module.warn('Please specify build.%s instead of %s. The %s option '
|
||||
'has been renamed and will be removed in Ansible 2.12.' % (build_option, option, option))
|
||||
client.module.deprecate('Please specify build.%s instead of %s. The %s option '
|
||||
'has been renamed' % (build_option, option, option),
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
if client.module.params['source'] == 'build':
|
||||
if (not client.module.params['build'] or not client.module.params['build'].get('path')):
|
||||
client.fail('If "source" is set to "build", the "build.path" option must be specified.')
|
||||
if client.module.params['build'].get('pull') is None:
|
||||
client.module.warn("The default for build.pull is currently 'yes', but will be changed to 'no' in Ansible 2.12. "
|
||||
"Please set build.pull explicitly to the value you need.")
|
||||
client.module.params['build']['pull'] = True # TODO: change to False in Ansible 2.12
|
||||
client.module.deprecate("The default for build.pull is currently 'yes', but will be changed to "
|
||||
"'no' in community.general 2.0.0. Please set build.pull explicitly to the value you need",
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
client.module.params['build']['pull'] = True # TODO: change to False in community.general 2.0.0
|
||||
|
||||
if client.module.params['state'] == 'present' and client.module.params['source'] is None:
|
||||
# Autodetection. To be removed in Ansible 2.12.
|
||||
# Autodetection. To be removed in community.general 2.0.0.
|
||||
if (client.module.params['build'] or dict()).get('path'):
|
||||
client.module.params['source'] = 'build'
|
||||
elif client.module.params['load_path']:
|
||||
client.module.params['source'] = 'load'
|
||||
else:
|
||||
client.module.params['source'] = 'pull'
|
||||
client.module.warn('The value of the "source" option was determined to be "%s". '
|
||||
client.module.deprecate('The value of the "source" option was determined to be "%s". '
|
||||
'Please set the "source" option explicitly. Autodetection will '
|
||||
'be removed in Ansible 2.12.' % client.module.params['source'])
|
||||
'be removed in community.general 2.0.0.' % client.module.params['source'],
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
|
||||
if client.module.params['force']:
|
||||
client.module.params['force_source'] = True
|
||||
client.module.params['force_absent'] = True
|
||||
client.module.params['force_tag'] = True
|
||||
client.module.warn('The "force" option will be removed in Ansible 2.12. Please '
|
||||
client.module.deprecate('The "force" option will be removed in community.general 2.0.0. Please '
|
||||
'use the "force_source", "force_absent" or "force_tag" option '
|
||||
'instead, depending on what you want to force.')
|
||||
'instead, depending on what you want to force.',
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
|
||||
try:
|
||||
results = dict(
|
||||
|
|
|
@ -249,7 +249,8 @@ def main():
|
|||
min_docker_api_version='1.20',
|
||||
)
|
||||
if client.module._name in ('docker_image_facts', 'community.general.docker_image_facts'):
|
||||
client.module.deprecate("The 'docker_image_facts' module has been renamed to 'docker_image_info'", version='2.12')
|
||||
client.module.deprecate("The 'docker_image_facts' module has been renamed to 'docker_image_info'",
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
|
||||
try:
|
||||
results = dict(
|
||||
|
|
|
@ -43,7 +43,7 @@ options:
|
|||
email:
|
||||
description:
|
||||
- Does nothing, do not use.
|
||||
- Will be removed in Ansible 2.14.
|
||||
- Will be removed in community.general 3.0.0.
|
||||
type: str
|
||||
reauthorize:
|
||||
description:
|
||||
|
@ -445,7 +445,7 @@ def main():
|
|||
registry_url=dict(type='str', default=DEFAULT_DOCKER_REGISTRY, aliases=['registry', 'url']),
|
||||
username=dict(type='str'),
|
||||
password=dict(type='str', no_log=True),
|
||||
email=dict(type='str', removed_in_version='2.14'),
|
||||
email=dict(type='str', removed_in_version='3.0.0', removed_from_collection='community.general'), # was Ansible 2.14
|
||||
reauthorize=dict(type='bool', default=False, aliases=['reauth']),
|
||||
state=dict(type='str', default='present', choices=['present', 'absent']),
|
||||
config_path=dict(type='path', default='~/.docker/config.json', aliases=['dockercfg_path']),
|
||||
|
|
|
@ -82,7 +82,7 @@ options:
|
|||
ipam_options:
|
||||
description:
|
||||
- Dictionary of IPAM options.
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter I(ipam_config) instead. In Docker 1.10.0, IPAM
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter I(ipam_config) instead. In Docker 1.10.0, IPAM
|
||||
options were introduced (see L(here,https://github.com/moby/moby/pull/17316)). This module parameter addresses
|
||||
the IPAM config not the newly introduced IPAM options. For the IPAM options, see the I(ipam_driver_options)
|
||||
parameter.
|
||||
|
@ -271,7 +271,7 @@ network:
|
|||
description:
|
||||
- Network inspection results for the affected network.
|
||||
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
|
||||
are also accessible directly as C(docker_network). Note that the returned fact will be removed in Ansible 2.12.
|
||||
are also accessible directly as C(docker_network). Note that the returned fact will be removed in community.general 2.0.0.
|
||||
returned: success
|
||||
type: dict
|
||||
sample: {}
|
||||
|
@ -668,7 +668,7 @@ def main():
|
|||
iprange=dict(type='str'),
|
||||
gateway=dict(type='str'),
|
||||
aux_addresses=dict(type='dict'),
|
||||
), removed_in_version='2.12'),
|
||||
), removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
ipam_config=dict(type='list', elements='dict', options=dict(
|
||||
subnet=dict(type='str'),
|
||||
iprange=dict(type='str'),
|
||||
|
|
|
@ -78,7 +78,7 @@ requirements:
|
|||
- pyyaml
|
||||
|
||||
notes:
|
||||
- Return values I(out) and I(err) have been deprecated and will be removed in Ansible 2.14. Use I(stdout) and I(stderr) instead.
|
||||
- Return values I(out) and I(err) have been deprecated and will be removed in community.general 3.0.0. Use I(stdout) and I(stderr) instead.
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
|
|
|
@ -444,7 +444,7 @@ class SwarmManager(DockerBaseClass):
|
|||
if self.state == 'inspect':
|
||||
self.client.module.deprecate(
|
||||
"The 'inspect' state is deprecated, please use 'docker_swarm_info' to inspect swarm cluster",
|
||||
version='2.12')
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
|
||||
choice_map.get(self.state)()
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ options:
|
|||
description:
|
||||
- List of the service constraints.
|
||||
- Corresponds to the C(--constraint) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(placement.constraints) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(placement.constraints) instead.
|
||||
type: list
|
||||
elements: str
|
||||
container_labels:
|
||||
|
@ -219,7 +219,7 @@ options:
|
|||
description:
|
||||
- Service CPU limit. C(0) equals no limit.
|
||||
- Corresponds to the C(--limit-cpu) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.cpus) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(limits.cpus) instead.
|
||||
type: float
|
||||
limit_memory:
|
||||
description:
|
||||
|
@ -229,7 +229,7 @@ options:
|
|||
- C(0) equals no limit.
|
||||
- Omitting the unit defaults to bytes.
|
||||
- Corresponds to the C(--limit-memory) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(limits.memory) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(limits.memory) instead.
|
||||
type: str
|
||||
logging:
|
||||
description:
|
||||
|
@ -250,13 +250,13 @@ options:
|
|||
description:
|
||||
- Configure the logging driver for a service.
|
||||
- Corresponds to the C(--log-driver) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.driver) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(logging.driver) instead.
|
||||
type: str
|
||||
log_driver_options:
|
||||
description:
|
||||
- Options for service logging driver.
|
||||
- Corresponds to the C(--log-opt) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(logging.options) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(logging.options) instead.
|
||||
type: dict
|
||||
mode:
|
||||
description:
|
||||
|
@ -451,7 +451,7 @@ options:
|
|||
description:
|
||||
- Service CPU reservation. C(0) equals no reservation.
|
||||
- Corresponds to the C(--reserve-cpu) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.cpus) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(reservations.cpus) instead.
|
||||
type: float
|
||||
reserve_memory:
|
||||
description:
|
||||
|
@ -461,7 +461,7 @@ options:
|
|||
- C(0) equals no reservation.
|
||||
- Omitting the unit defaults to bytes.
|
||||
- Corresponds to the C(--reserve-memory) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(reservations.memory) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(reservations.memory) instead.
|
||||
type: str
|
||||
resolve_image:
|
||||
description:
|
||||
|
@ -506,7 +506,7 @@ options:
|
|||
description:
|
||||
- Restart condition of the service.
|
||||
- Corresponds to the C(--restart-condition) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.condition) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.condition) instead.
|
||||
type: str
|
||||
choices:
|
||||
- none
|
||||
|
@ -516,7 +516,7 @@ options:
|
|||
description:
|
||||
- Maximum number of service restarts.
|
||||
- Corresponds to the C(--restart-condition) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.max_attempts) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.max_attempts) instead.
|
||||
type: int
|
||||
restart_policy_delay:
|
||||
description:
|
||||
|
@ -524,7 +524,7 @@ options:
|
|||
- "Accepts a duration as an integer in nanoseconds or as a string in a format that look like:
|
||||
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
||||
- Corresponds to the C(--restart-delay) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.delay) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.delay) instead.
|
||||
type: raw
|
||||
restart_policy_window:
|
||||
description:
|
||||
|
@ -532,7 +532,7 @@ options:
|
|||
- "Accepts a duration as an integer in nanoseconds or as a string in a format that look like:
|
||||
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
||||
- Corresponds to the C(--restart-window) option of C(docker service create).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(restart_config.window) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(restart_config.window) instead.
|
||||
type: raw
|
||||
rollback_config:
|
||||
description:
|
||||
|
@ -698,21 +698,21 @@ options:
|
|||
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
||||
- Corresponds to the C(--update-delay) option of C(docker service create).
|
||||
- Before Ansible 2.8, the default value for this option was C(10).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.delay) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.delay) instead.
|
||||
type: raw
|
||||
update_parallelism:
|
||||
description:
|
||||
- Rolling update parallelism.
|
||||
- Corresponds to the C(--update-parallelism) option of C(docker service create).
|
||||
- Before Ansible 2.8, the default value for this option was C(1).
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.parallelism) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.parallelism) instead.
|
||||
type: int
|
||||
update_failure_action:
|
||||
description:
|
||||
- Action to take in case of container failure.
|
||||
- Corresponds to the C(--update-failure-action) option of C(docker service create).
|
||||
- Usage of I(rollback) requires API version >= 1.29.
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.failure_action) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.failure_action) instead.
|
||||
type: str
|
||||
choices:
|
||||
- continue
|
||||
|
@ -725,21 +725,21 @@ options:
|
|||
C(5h34m56s), C(1m30s) etc. The supported units are C(us), C(ms), C(s), C(m) and C(h)."
|
||||
- Corresponds to the C(--update-monitor) option of C(docker service create).
|
||||
- Requires API version >= 1.25.
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.monitor) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.monitor) instead.
|
||||
type: raw
|
||||
update_max_failure_ratio:
|
||||
description:
|
||||
- Fraction of tasks that may fail during an update before the failure action is invoked.
|
||||
- Corresponds to the C(--update-max-failure-ratio) option of C(docker service create).
|
||||
- Requires API version >= 1.25.
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.max_failure_ratio) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.max_failure_ratio) instead.
|
||||
type: float
|
||||
update_order:
|
||||
description:
|
||||
- Specifies the order of operations when rolling out an updated task.
|
||||
- Corresponds to the C(--update-order) option of C(docker service create).
|
||||
- Requires API version >= 1.29.
|
||||
- Deprecated in 2.8, will be removed in 2.12. Use parameter C(update_config.order) instead.
|
||||
- Deprecated in 2.8, will be removed in community.general 2.0.0. Use parameter C(update_config.order) instead.
|
||||
type: str
|
||||
choices:
|
||||
- stop-first
|
||||
|
@ -2748,8 +2748,10 @@ def main():
|
|||
driver=dict(type='str'),
|
||||
options=dict(type='dict'),
|
||||
)),
|
||||
log_driver=dict(type='str', removed_in_version='2.12'),
|
||||
log_driver_options=dict(type='dict', removed_in_version='2.12'),
|
||||
log_driver=dict(type='str', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
log_driver_options=dict(type='dict', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
publish=dict(type='list', elements='dict', options=dict(
|
||||
published_port=dict(type='int', required=True),
|
||||
target_port=dict(type='int', required=True),
|
||||
|
@ -2760,7 +2762,8 @@ def main():
|
|||
constraints=dict(type='list', elements='str'),
|
||||
preferences=dict(type='list', elements='dict'),
|
||||
)),
|
||||
constraints=dict(type='list', elements='str', removed_in_version='2.12'),
|
||||
constraints=dict(type='list', elements='str', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
tty=dict(type='bool'),
|
||||
dns=dict(type='list', elements='str'),
|
||||
dns_search=dict(type='list', elements='str'),
|
||||
|
@ -2789,15 +2792,19 @@ def main():
|
|||
cpus=dict(type='float'),
|
||||
memory=dict(type='str'),
|
||||
)),
|
||||
limit_cpu=dict(type='float', removed_in_version='2.12'),
|
||||
limit_memory=dict(type='str', removed_in_version='2.12'),
|
||||
limit_cpu=dict(type='float', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
limit_memory=dict(type='str', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
read_only=dict(type='bool'),
|
||||
reservations=dict(type='dict', options=dict(
|
||||
cpus=dict(type='float'),
|
||||
memory=dict(type='str'),
|
||||
)),
|
||||
reserve_cpu=dict(type='float', removed_in_version='2.12'),
|
||||
reserve_memory=dict(type='str', removed_in_version='2.12'),
|
||||
reserve_cpu=dict(type='float', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
reserve_memory=dict(type='str', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
resolve_image=dict(type='bool', default=False),
|
||||
restart_config=dict(type='dict', options=dict(
|
||||
condition=dict(type='str', choices=['none', 'on-failure', 'any']),
|
||||
|
@ -2808,11 +2815,15 @@ def main():
|
|||
restart_policy=dict(
|
||||
type='str',
|
||||
choices=['none', 'on-failure', 'any'],
|
||||
removed_in_version='2.12'
|
||||
removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general', # was Ansible 2.12
|
||||
),
|
||||
restart_policy_delay=dict(type='raw', removed_in_version='2.12'),
|
||||
restart_policy_attempts=dict(type='int', removed_in_version='2.12'),
|
||||
restart_policy_window=dict(type='raw', removed_in_version='2.12'),
|
||||
restart_policy_delay=dict(type='raw', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
restart_policy_attempts=dict(type='int', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
restart_policy_window=dict(type='raw', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
rollback_config=dict(type='dict', options=dict(
|
||||
parallelism=dict(type='int'),
|
||||
delay=dict(type='str'),
|
||||
|
@ -2835,19 +2846,25 @@ def main():
|
|||
max_failure_ratio=dict(type='float'),
|
||||
order=dict(type='str'),
|
||||
)),
|
||||
update_delay=dict(type='raw', removed_in_version='2.12'),
|
||||
update_parallelism=dict(type='int', removed_in_version='2.12'),
|
||||
update_delay=dict(type='raw', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
update_parallelism=dict(type='int', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
update_failure_action=dict(
|
||||
type='str',
|
||||
choices=['continue', 'pause', 'rollback'],
|
||||
removed_in_version='2.12'
|
||||
removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general', # was Ansible 2.12
|
||||
),
|
||||
update_monitor=dict(type='raw', removed_in_version='2.12'),
|
||||
update_max_failure_ratio=dict(type='float', removed_in_version='2.12'),
|
||||
update_monitor=dict(type='raw', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
update_max_failure_ratio=dict(type='float', removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general'), # was Ansible 2.12
|
||||
update_order=dict(
|
||||
type='str',
|
||||
choices=['stop-first', 'start-first'],
|
||||
removed_in_version='2.12'
|
||||
removed_in_version='2.0.0',
|
||||
removed_from_collection='community.general', # was Ansible 2.12
|
||||
),
|
||||
user=dict(type='str'),
|
||||
working_dir=dict(type='str'),
|
||||
|
|
|
@ -45,7 +45,7 @@ options:
|
|||
- With state C(present) causes the volume to be deleted and recreated if the volume already
|
||||
exist and the driver, driver options or labels differ. This will cause any data in the existing
|
||||
volume to be lost.
|
||||
- Deprecated. Will be removed in Ansible 2.12. Set I(recreate) to C(options-changed) instead
|
||||
- Deprecated. Will be removed in community.general 2.0.0. Set I(recreate) to C(options-changed) instead
|
||||
for the same behavior of setting I(force) to C(yes).
|
||||
type: bool
|
||||
default: no
|
||||
|
@ -113,7 +113,7 @@ volume:
|
|||
description:
|
||||
- Volume inspection results for the affected volume.
|
||||
- Note that facts are part of the registered vars since Ansible 2.8. For compatibility reasons, the facts
|
||||
are also accessible directly as C(docker_volume). Note that the returned fact will be removed in Ansible 2.12.
|
||||
are also accessible directly as C(docker_volume). Note that the returned fact will be removed in community.general 2.0.0.
|
||||
returned: success
|
||||
type: dict
|
||||
sample: {}
|
||||
|
@ -302,7 +302,7 @@ def main():
|
|||
driver=dict(type='str', default='local'),
|
||||
driver_options=dict(type='dict', default={}),
|
||||
labels=dict(type='dict'),
|
||||
force=dict(type='bool', removed_in_version='2.12'),
|
||||
force=dict(type='bool', removed_in_version='2.0.0', removed_from_collection='community.general'), # was Ansible 2.12
|
||||
recreate=dict(type='str', default='never', choices=['always', 'never', 'options-changed']),
|
||||
debug=dict(type='bool', default=False)
|
||||
)
|
||||
|
|
|
@ -23,7 +23,7 @@ requirements:
|
|||
- "python >= 2.6"
|
||||
- "apache-libcloud >= 0.19.0"
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_dns_resource_record_set) instead.
|
||||
options:
|
||||
|
|
|
@ -22,7 +22,7 @@ author: "William Albert (@walbert947)"
|
|||
requirements:
|
||||
- "apache-libcloud >= 0.19.0"
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_dns_managed_zone) instead.
|
||||
options:
|
||||
|
|
|
@ -16,7 +16,7 @@ description:
|
|||
Full install/configuration instructions for the gce* modules can
|
||||
be found in the comments of ansible/test/gce_tests.py.
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_compute_instance) instead.
|
||||
options:
|
||||
|
|
|
@ -1,400 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright 2017 Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
module: gcp_backend_service
|
||||
short_description: Create or Destroy a Backend Service.
|
||||
description:
|
||||
- Create or Destroy a Backend Service. See
|
||||
U(https://cloud.google.com/compute/docs/load-balancing/http/backend-service) for an overview.
|
||||
Full install/configuration instructions for the Google Cloud modules can
|
||||
be found in the comments of ansible/test/gce_tests.py.
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "apache-libcloud >= 1.3.0"
|
||||
notes:
|
||||
- Update is not currently supported.
|
||||
- Only global backend services are currently supported. Regional backends not currently supported.
|
||||
- Internal load balancing not currently supported.
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_compute_backend_service) instead.
|
||||
author:
|
||||
- "Tom Melendez (@supertom) <tom@supertom.com>"
|
||||
options:
|
||||
backend_service_name:
|
||||
description:
|
||||
- Name of the Backend Service.
|
||||
required: true
|
||||
backends:
|
||||
description:
|
||||
- List of backends that make up the backend service. A backend is made up of
|
||||
an instance group and optionally several other parameters. See
|
||||
U(https://cloud.google.com/compute/docs/reference/latest/backendServices)
|
||||
for details.
|
||||
required: true
|
||||
healthchecks:
|
||||
description:
|
||||
- List of healthchecks. Only one healthcheck is supported.
|
||||
required: true
|
||||
enable_cdn:
|
||||
description:
|
||||
- If true, enable Cloud CDN for this Backend Service.
|
||||
type: bool
|
||||
port_name:
|
||||
description:
|
||||
- Name of the port on the managed instance group (MIG) that backend
|
||||
services can forward data to. Required for external load balancing.
|
||||
protocol:
|
||||
description:
|
||||
- The protocol this Backend Service uses to communicate with backends.
|
||||
Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
|
||||
required: false
|
||||
timeout:
|
||||
description:
|
||||
- How many seconds to wait for the backend before considering it a failed
|
||||
request. Default is 30 seconds. Valid range is 1-86400.
|
||||
required: false
|
||||
service_account_email:
|
||||
description:
|
||||
- Service account email
|
||||
credentials_file:
|
||||
description:
|
||||
- Path to the JSON file associated with the service account email.
|
||||
project_id:
|
||||
description:
|
||||
- GCE project ID.
|
||||
state:
|
||||
description:
|
||||
- Desired state of the resource
|
||||
default: "present"
|
||||
choices: ["absent", "present"]
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Create Minimum Backend Service
|
||||
gcp_backend_service:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
backend_service_name: "{{ bes }}"
|
||||
backends:
|
||||
- instance_group: managed_instance_group_1
|
||||
healthchecks:
|
||||
- healthcheck_name_for_backend_service
|
||||
port_name: myhttpport
|
||||
state: present
|
||||
|
||||
- name: Create BES with extended backend parameters
|
||||
gcp_backend_service:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
backend_service_name: "{{ bes }}"
|
||||
backends:
|
||||
- instance_group: managed_instance_group_1
|
||||
max_utilization: 0.6
|
||||
max_rate: 10
|
||||
- instance_group: managed_instance_group_2
|
||||
max_utilization: 0.5
|
||||
max_rate: 4
|
||||
healthchecks:
|
||||
- healthcheck_name_for_backend_service
|
||||
port_name: myhttpport
|
||||
state: present
|
||||
timeout: 60
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
backend_service_created:
|
||||
description: Indicator Backend Service was created.
|
||||
returned: When a Backend Service is created.
|
||||
type: bool
|
||||
sample: "True"
|
||||
backend_service_deleted:
|
||||
description: Indicator Backend Service was deleted.
|
||||
returned: When a Backend Service is deleted.
|
||||
type: bool
|
||||
sample: "True"
|
||||
backend_service_name:
|
||||
description: Name of the Backend Service.
|
||||
returned: Always.
|
||||
type: str
|
||||
sample: "my-backend-service"
|
||||
backends:
|
||||
description: List of backends (comprised of instance_group) that
|
||||
make up a Backend Service.
|
||||
returned: When a Backend Service exists.
|
||||
type: list
|
||||
sample: "[ { 'instance_group': 'mig_one', 'zone': 'us-central1-b'} ]"
|
||||
enable_cdn:
|
||||
description: If Cloud CDN is enabled. null if not set.
|
||||
returned: When a backend service exists.
|
||||
type: bool
|
||||
sample: "True"
|
||||
healthchecks:
|
||||
description: List of healthchecks applied to the Backend Service.
|
||||
returned: When a Backend Service exists.
|
||||
type: list
|
||||
sample: "[ 'my-healthcheck' ]"
|
||||
protocol:
|
||||
description: Protocol used to communicate with the Backends.
|
||||
returned: When a Backend Service exists.
|
||||
type: str
|
||||
sample: "HTTP"
|
||||
port_name:
|
||||
description: Name of Backend Port.
|
||||
returned: When a Backend Service exists.
|
||||
type: str
|
||||
sample: "myhttpport"
|
||||
timeout:
|
||||
description: In seconds, how long before a request sent to a backend is
|
||||
considered failed.
|
||||
returned: If specified.
|
||||
type: int
|
||||
sample: "myhttpport"
|
||||
'''
|
||||
|
||||
try:
|
||||
from ast import literal_eval
|
||||
HAS_PYTHON26 = True
|
||||
except ImportError:
|
||||
HAS_PYTHON26 = False
|
||||
|
||||
try:
|
||||
import libcloud
|
||||
from libcloud.compute.types import Provider
|
||||
from libcloud.compute.providers import get_driver
|
||||
from libcloud.common.google import GoogleBaseError, QuotaExceededError, \
|
||||
ResourceExistsError, ResourceInUseError, ResourceNotFoundError
|
||||
from libcloud.compute.drivers.gce import GCEAddress
|
||||
_ = Provider.GCE
|
||||
HAS_LIBCLOUD = True
|
||||
except ImportError:
|
||||
HAS_LIBCLOUD = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.gce import gce_connect
|
||||
from ansible_collections.community.general.plugins.module_utils.gcp import check_params
|
||||
|
||||
|
||||
def _validate_params(params):
|
||||
"""
|
||||
Validate backend_service params.
|
||||
|
||||
This function calls _validate_backend_params to verify
|
||||
the backend-specific parameters.
|
||||
|
||||
:param params: Ansible dictionary containing configuration.
|
||||
:type params: ``dict``
|
||||
|
||||
:return: True or raises ValueError
|
||||
:rtype: ``bool`` or `class:ValueError`
|
||||
"""
|
||||
fields = [
|
||||
{'name': 'timeout', 'type': int, 'min': 1, 'max': 86400},
|
||||
]
|
||||
try:
|
||||
check_params(params, fields)
|
||||
_validate_backend_params(params['backends'])
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
return (True, '')
|
||||
|
||||
|
||||
def _validate_backend_params(backends):
|
||||
"""
|
||||
Validate configuration for backends.
|
||||
|
||||
:param backends: Ansible dictionary containing backends configuration (only).
|
||||
:type backends: ``dict``
|
||||
|
||||
:return: True or raises ValueError
|
||||
:rtype: ``bool`` or `class:ValueError`
|
||||
"""
|
||||
fields = [
|
||||
{'name': 'balancing_mode', 'type': str, 'values': ['UTILIZATION', 'RATE', 'CONNECTION']},
|
||||
{'name': 'max_utilization', 'type': float},
|
||||
{'name': 'max_connections', 'type': int},
|
||||
{'name': 'max_rate', 'type': int},
|
||||
{'name': 'max_rate_per_instance', 'type': float},
|
||||
]
|
||||
|
||||
if not backends:
|
||||
raise ValueError('backends should be a list.')
|
||||
|
||||
for backend in backends:
|
||||
try:
|
||||
check_params(backend, fields)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
if 'max_rate' in backend and 'max_rate_per_instance' in backend:
|
||||
raise ValueError('Both maxRate or maxRatePerInstance cannot be set.')
|
||||
|
||||
return (True, '')
|
||||
|
||||
|
||||
def get_backend_service(gce, name):
|
||||
"""
|
||||
Get a Backend Service from GCE.
|
||||
|
||||
:param gce: An initialized GCE driver object.
|
||||
:type gce: :class: `GCENodeDriver`
|
||||
|
||||
:param name: Name of the Backend Service.
|
||||
:type name: ``str``
|
||||
|
||||
:return: A GCEBackendService object or None.
|
||||
:rtype: :class: `GCEBackendService` or None
|
||||
"""
|
||||
try:
|
||||
# Does the Backend Service already exist?
|
||||
return gce.ex_get_backendservice(name=name)
|
||||
|
||||
except ResourceNotFoundError:
|
||||
return None
|
||||
|
||||
|
||||
def get_healthcheck(gce, name):
|
||||
return gce.ex_get_healthcheck(name)
|
||||
|
||||
|
||||
def get_instancegroup(gce, name, zone=None):
|
||||
return gce.ex_get_instancegroup(name=name, zone=zone)
|
||||
|
||||
|
||||
def create_backend_service(gce, params):
|
||||
"""
|
||||
Create a new Backend Service.
|
||||
|
||||
:param gce: An initialized GCE driver object.
|
||||
:type gce: :class: `GCENodeDriver`
|
||||
|
||||
:param params: Dictionary of parameters needed by the module.
|
||||
:type params: ``dict``
|
||||
|
||||
:return: Tuple with changed stats
|
||||
:rtype: tuple in the format of (bool, bool)
|
||||
"""
|
||||
from copy import deepcopy
|
||||
|
||||
changed = False
|
||||
return_data = False
|
||||
# only one healthcheck is currently supported
|
||||
hc_name = params['healthchecks'][0]
|
||||
hc = get_healthcheck(gce, hc_name)
|
||||
backends = []
|
||||
for backend in params['backends']:
|
||||
ig = get_instancegroup(gce, backend['instance_group'],
|
||||
backend.get('zone', None))
|
||||
kwargs = deepcopy(backend)
|
||||
kwargs['instance_group'] = ig
|
||||
backends.append(gce.ex_create_backend(
|
||||
**kwargs))
|
||||
|
||||
bes = gce.ex_create_backendservice(
|
||||
name=params['backend_service_name'], healthchecks=[hc], backends=backends,
|
||||
enable_cdn=params['enable_cdn'], port_name=params['port_name'],
|
||||
timeout_sec=params['timeout'], protocol=params['protocol'])
|
||||
|
||||
if bes:
|
||||
changed = True
|
||||
return_data = True
|
||||
|
||||
return (changed, return_data)
|
||||
|
||||
|
||||
def delete_backend_service(bes):
|
||||
"""
|
||||
Delete a Backend Service. The Instance Groups are NOT destroyed.
|
||||
"""
|
||||
changed = False
|
||||
return_data = False
|
||||
if bes.destroy():
|
||||
changed = True
|
||||
return_data = True
|
||||
return (changed, return_data)
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
backends=dict(type='list', required=True),
|
||||
backend_service_name=dict(required=True),
|
||||
healthchecks=dict(type='list', required=True),
|
||||
service_account_email=dict(),
|
||||
service_account_permissions=dict(type='list'),
|
||||
enable_cdn=dict(type='bool'),
|
||||
port_name=dict(type='str'),
|
||||
protocol=dict(type='str', default='TCP',
|
||||
choices=['HTTP', 'HTTPS', 'SSL', 'TCP']),
|
||||
timeout=dict(type='int'),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
pem_file=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ), )
|
||||
|
||||
if not HAS_PYTHON26:
|
||||
module.fail_json(
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
if not HAS_LIBCLOUD:
|
||||
module.fail_json(
|
||||
msg='libcloud with GCE Backend Service support (1.3+) required for this module.')
|
||||
|
||||
gce = gce_connect(module)
|
||||
if not hasattr(gce, 'ex_create_instancegroupmanager'):
|
||||
module.fail_json(
|
||||
msg='libcloud with GCE Backend Service support (1.3+) required for this module.',
|
||||
changed=False)
|
||||
|
||||
params = {}
|
||||
params['state'] = module.params.get('state')
|
||||
params['backend_service_name'] = module.params.get('backend_service_name')
|
||||
params['backends'] = module.params.get('backends')
|
||||
params['healthchecks'] = module.params.get('healthchecks')
|
||||
params['enable_cdn'] = module.params.get('enable_cdn', None)
|
||||
params['port_name'] = module.params.get('port_name', None)
|
||||
params['protocol'] = module.params.get('protocol', None)
|
||||
params['timeout'] = module.params.get('timeout', None)
|
||||
|
||||
try:
|
||||
_validate_params(params)
|
||||
except Exception as e:
|
||||
module.fail_json(msg=e.message, changed=False)
|
||||
|
||||
changed = False
|
||||
json_output = {'state': params['state']}
|
||||
bes = get_backend_service(gce, params['backend_service_name'])
|
||||
|
||||
if not bes:
|
||||
if params['state'] == 'absent':
|
||||
# Doesn't exist and state==absent.
|
||||
changed = False
|
||||
module.fail_json(
|
||||
msg="Cannot delete unknown backend service: %s" %
|
||||
(params['backend_service_name']))
|
||||
else:
|
||||
# Create
|
||||
(changed, json_output['backend_service_created']) = create_backend_service(gce,
|
||||
params)
|
||||
elif params['state'] == 'absent':
|
||||
# Delete
|
||||
(changed, json_output['backend_service_deleted']) = delete_backend_service(bes)
|
||||
else:
|
||||
# TODO(supertom): Add update support when it is available in libcloud.
|
||||
changed = False
|
||||
|
||||
json_output['changed'] = changed
|
||||
json_output.update(params)
|
||||
module.exit_json(**json_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,349 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright 2017 Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: gcp_forwarding_rule
|
||||
short_description: Create, Update or Destroy a Forwarding_Rule.
|
||||
description:
|
||||
- Create, Update or Destroy a Forwarding_Rule. See
|
||||
U(https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) for an overview.
|
||||
More details on the Global Forwarding_Rule API can be found at
|
||||
U(https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules)
|
||||
More details on the Forwarding Rules API can be found at
|
||||
U(https://cloud.google.com/compute/docs/reference/latest/forwardingRules)
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "google-api-python-client >= 1.6.2"
|
||||
- "google-auth >= 0.9.0"
|
||||
- "google-auth-httplib2 >= 0.0.2"
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_compute_forwarding_rule) or M(gcp_compute_global_forwarding_rule) instead.
|
||||
notes:
|
||||
- Currently only supports global forwarding rules.
|
||||
As such, Load Balancing Scheme is always EXTERNAL.
|
||||
author:
|
||||
- "Tom Melendez (@supertom) <tom@supertom.com>"
|
||||
options:
|
||||
address:
|
||||
description:
|
||||
- IPv4 or named IP address. Must be of the same scope (regional, global).
|
||||
Reserved addresses can (and probably should) be used for global
|
||||
forwarding rules. You may reserve IPs from the console or
|
||||
via the gce_eip module.
|
||||
required: false
|
||||
forwarding_rule_name:
|
||||
description:
|
||||
- Name of the Forwarding_Rule.
|
||||
required: true
|
||||
port_range:
|
||||
description:
|
||||
- For global forwarding rules, must be set to 80 or 8080 for TargetHttpProxy, and
|
||||
443 for TargetHttpsProxy or TargetSslProxy.
|
||||
required: false
|
||||
protocol:
|
||||
description:
|
||||
- For global forwarding rules, TCP, UDP, ESP, AH, SCTP or ICMP. Default is TCP.
|
||||
required: false
|
||||
region:
|
||||
description:
|
||||
- The region for this forwarding rule. Currently, only 'global' is supported.
|
||||
required: false
|
||||
state:
|
||||
description:
|
||||
- The state of the Forwarding Rule. 'present' or 'absent'
|
||||
required: true
|
||||
choices: ["present", "absent"]
|
||||
target:
|
||||
description:
|
||||
- Target resource for forwarding rule. For global proxy, this is a Global
|
||||
TargetProxy resource. Required for external load balancing (including Global load balancing)
|
||||
required: false
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Create Minimum GLOBAL Forwarding_Rule
|
||||
gcp_forwarding_rule:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
forwarding_rule_name: my-forwarding_rule
|
||||
protocol: TCP
|
||||
port_range: 80
|
||||
region: global
|
||||
target: my-target-proxy
|
||||
state: present
|
||||
|
||||
- name: Create Forwarding_Rule w/reserved static address
|
||||
gcp_forwarding_rule:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
forwarding_rule_name: my-forwarding_rule
|
||||
protocol: TCP
|
||||
port_range: 80
|
||||
address: my-reserved-static-address-name
|
||||
region: global
|
||||
target: my-target-proxy
|
||||
state: present
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
forwarding_rule_name:
|
||||
description: Name of the Forwarding_Rule
|
||||
returned: Always
|
||||
type: str
|
||||
sample: my-target-proxy
|
||||
forwarding_rule:
|
||||
description: GCP Forwarding_Rule dictionary
|
||||
returned: Always. Refer to GCP documentation for detailed field descriptions.
|
||||
type: dict
|
||||
sample: { "name": "my-forwarding_rule", "target": "..." }
|
||||
region:
|
||||
description: Region for Forwarding Rule.
|
||||
returned: Always
|
||||
type: bool
|
||||
sample: true
|
||||
state:
|
||||
description: state of the Forwarding_Rule
|
||||
returned: Always.
|
||||
type: str
|
||||
sample: present
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.gcp import get_google_api_client, GCPUtils
|
||||
|
||||
|
||||
USER_AGENT_PRODUCT = 'ansible-forwarding_rule'
|
||||
USER_AGENT_VERSION = '0.0.1'
|
||||
|
||||
|
||||
def _build_global_forwarding_rule_dict(params, project_id=None):
|
||||
"""
|
||||
Reformat services in Ansible Params.
|
||||
|
||||
:param params: Params from AnsibleModule object
|
||||
:type params: ``dict``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: dictionary suitable for submission to GCP API.
|
||||
:rtype ``dict``
|
||||
"""
|
||||
url = ''
|
||||
if project_id:
|
||||
url = GCPUtils.build_googleapi_url(project_id)
|
||||
gcp_dict = GCPUtils.params_to_gcp_dict(params, 'forwarding_rule_name')
|
||||
if 'target' in gcp_dict:
|
||||
gcp_dict['target'] = '%s/global/targetHttpProxies/%s' % (url,
|
||||
gcp_dict['target'])
|
||||
if 'address' in gcp_dict:
|
||||
gcp_dict['IPAddress'] = '%s/global/addresses/%s' % (url,
|
||||
gcp_dict['address'])
|
||||
del gcp_dict['address']
|
||||
if 'protocol' in gcp_dict:
|
||||
gcp_dict['IPProtocol'] = gcp_dict['protocol']
|
||||
del gcp_dict['protocol']
|
||||
return gcp_dict
|
||||
|
||||
|
||||
def get_global_forwarding_rule(client, name, project_id=None):
|
||||
"""
|
||||
Get a Global Forwarding Rule from GCP.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param name: Name of the Global Forwarding Rule.
|
||||
:type name: ``str``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: A dict resp from the respective GCP 'get' request.
|
||||
:rtype: ``dict``
|
||||
"""
|
||||
try:
|
||||
req = client.globalForwardingRules().get(
|
||||
project=project_id, forwardingRule=name)
|
||||
return GCPUtils.execute_api_client_req(req, raise_404=False)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def create_global_forwarding_rule(client, params, project_id):
|
||||
"""
|
||||
Create a new Global Forwarding Rule.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param params: Dictionary of arguments from AnsibleModule.
|
||||
:type params: ``dict``
|
||||
|
||||
:return: Tuple with changed status and response dict
|
||||
:rtype: ``tuple`` in the format of (bool, dict)
|
||||
"""
|
||||
gcp_dict = _build_global_forwarding_rule_dict(params, project_id)
|
||||
try:
|
||||
req = client.globalForwardingRules().insert(project=project_id, body=gcp_dict)
|
||||
return_data = GCPUtils.execute_api_client_req(req, client, raw=False)
|
||||
if not return_data:
|
||||
return_data = get_global_forwarding_rule(client,
|
||||
name=params['forwarding_rule_name'],
|
||||
project_id=project_id)
|
||||
return (True, return_data)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def delete_global_forwarding_rule(client, name, project_id):
|
||||
"""
|
||||
Delete a Global Forwarding Rule.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param name: Name of the Target Proxy.
|
||||
:type name: ``str``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: Tuple with changed status and response dict
|
||||
:rtype: ``tuple`` in the format of (bool, dict)
|
||||
"""
|
||||
try:
|
||||
req = client.globalForwardingRules().delete(
|
||||
project=project_id, forwardingRule=name)
|
||||
return_data = GCPUtils.execute_api_client_req(req, client)
|
||||
return (True, return_data)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def update_global_forwarding_rule(client, forwarding_rule, params, name, project_id):
|
||||
"""
|
||||
Update a Global Forwarding_Rule. Currently, only a target can be updated.
|
||||
|
||||
If the forwarding_rule has not changed, the update will not occur.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param forwarding_rule: Name of the Target Proxy.
|
||||
:type forwarding_rule: ``dict``
|
||||
|
||||
:param params: Dictionary of arguments from AnsibleModule.
|
||||
:type params: ``dict``
|
||||
|
||||
:param name: Name of the Global Forwarding Rule.
|
||||
:type name: ``str``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: Tuple with changed status and response dict
|
||||
:rtype: ``tuple`` in the format of (bool, dict)
|
||||
"""
|
||||
gcp_dict = _build_global_forwarding_rule_dict(params, project_id)
|
||||
|
||||
GCPUtils.are_params_equal(forwarding_rule, gcp_dict)
|
||||
if forwarding_rule['target'] == gcp_dict['target']:
|
||||
return (False, 'no update necessary')
|
||||
|
||||
try:
|
||||
req = client.globalForwardingRules().setTarget(project=project_id,
|
||||
forwardingRule=name,
|
||||
body={'target': gcp_dict['target']})
|
||||
return_data = GCPUtils.execute_api_client_req(
|
||||
req, client=client, raw=False)
|
||||
return (True, return_data)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
forwarding_rule_name=dict(required=True),
|
||||
region=dict(required=True),
|
||||
target=dict(required=False),
|
||||
address=dict(type='str', required=False),
|
||||
protocol=dict(required=False, default='TCP', choices=['TCP']),
|
||||
port_range=dict(required=False),
|
||||
load_balancing_scheme=dict(
|
||||
required=False, default='EXTERNAL', choices=['EXTERNAL']),
|
||||
state=dict(required=True, choices=['absent', 'present']),
|
||||
service_account_email=dict(),
|
||||
service_account_permissions=dict(type='list'),
|
||||
pem_file=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ), )
|
||||
|
||||
client, conn_params = get_google_api_client(module, 'compute', user_agent_product=USER_AGENT_PRODUCT,
|
||||
user_agent_version=USER_AGENT_VERSION)
|
||||
|
||||
params = {}
|
||||
params['state'] = module.params.get('state')
|
||||
params['forwarding_rule_name'] = module.params.get('forwarding_rule_name')
|
||||
params['region'] = module.params.get('region')
|
||||
params['target'] = module.params.get('target', None)
|
||||
params['protocol'] = module.params.get('protocol', None)
|
||||
params['port_range'] = module.params.get('port_range')
|
||||
if module.params.get('address', None):
|
||||
params['address'] = module.params.get('address', None)
|
||||
|
||||
if params['region'] != 'global':
|
||||
# This module currently doesn't support regional rules.
|
||||
module.fail_json(
|
||||
msg=("%s - Only global forwarding rules currently supported. "
|
||||
"Be sure to specify 'global' for the region option.") %
|
||||
(params['forwarding_rule_name']))
|
||||
|
||||
changed = False
|
||||
json_output = {'state': params['state']}
|
||||
forwarding_rule = None
|
||||
if params['region'] == 'global':
|
||||
forwarding_rule = get_global_forwarding_rule(client,
|
||||
name=params['forwarding_rule_name'],
|
||||
project_id=conn_params['project_id'])
|
||||
if not forwarding_rule:
|
||||
if params['state'] == 'absent':
|
||||
# Doesn't exist in GCE, and state==absent.
|
||||
changed = False
|
||||
module.fail_json(
|
||||
msg="Cannot delete unknown forwarding_rule: %s" %
|
||||
(params['forwarding_rule_name']))
|
||||
else:
|
||||
# Create
|
||||
changed, json_output['forwarding_rule'] = create_global_forwarding_rule(client,
|
||||
params=params,
|
||||
project_id=conn_params['project_id'])
|
||||
elif params['state'] == 'absent':
|
||||
# Delete
|
||||
changed, json_output['forwarding_rule'] = delete_global_forwarding_rule(client,
|
||||
name=params['forwarding_rule_name'],
|
||||
project_id=conn_params['project_id'])
|
||||
else:
|
||||
changed, json_output['forwarding_rule'] = update_global_forwarding_rule(client,
|
||||
forwarding_rule=forwarding_rule,
|
||||
params=params,
|
||||
name=params['forwarding_rule_name'],
|
||||
project_id=conn_params['project_id'])
|
||||
|
||||
json_output['changed'] = changed
|
||||
json_output.update(params)
|
||||
module.exit_json(**json_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,444 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright 2017 Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: gcp_healthcheck
|
||||
short_description: Create, Update or Destroy a Healthcheck.
|
||||
description:
|
||||
- Create, Update or Destroy a Healthcheck. Currently only HTTP and
|
||||
HTTPS Healthchecks are supported. Healthchecks are used to monitor
|
||||
individual instances, managed instance groups and/or backend
|
||||
services. Healtchecks are reusable.
|
||||
- Visit
|
||||
U(https://cloud.google.com/compute/docs/load-balancing/health-checks)
|
||||
for an overview of Healthchecks on GCP.
|
||||
- See
|
||||
U(https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks) for
|
||||
API details on HTTP Healthchecks.
|
||||
- See
|
||||
U(https://cloud.google.com/compute/docs/reference/latest/httpsHealthChecks)
|
||||
for more details on the HTTPS Healtcheck API.
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "google-api-python-client >= 1.6.2"
|
||||
- "google-auth >= 0.9.0"
|
||||
- "google-auth-httplib2 >= 0.0.2"
|
||||
notes:
|
||||
- Only supports HTTP and HTTPS Healthchecks currently.
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: >
|
||||
Use M(gcp_compute_health_check), M(gcp_compute_http_health_check) or
|
||||
M(gcp_compute_https_health_check) instead.
|
||||
author:
|
||||
- "Tom Melendez (@supertom) <tom@supertom.com>"
|
||||
options:
|
||||
check_interval:
|
||||
description:
|
||||
- How often (in seconds) to send a health check.
|
||||
default: 5
|
||||
healthcheck_name:
|
||||
description:
|
||||
- Name of the Healthcheck.
|
||||
required: true
|
||||
healthcheck_type:
|
||||
description:
|
||||
- Type of Healthcheck.
|
||||
required: true
|
||||
choices: ["HTTP", "HTTPS"]
|
||||
host_header:
|
||||
description:
|
||||
- The value of the host header in the health check request. If left
|
||||
empty, the public IP on behalf of which this health
|
||||
check is performed will be used.
|
||||
required: true
|
||||
default: ""
|
||||
port:
|
||||
description:
|
||||
- The TCP port number for the health check request. The default value is
|
||||
443 for HTTPS and 80 for HTTP.
|
||||
request_path:
|
||||
description:
|
||||
- The request path of the HTTPS health check request.
|
||||
required: false
|
||||
default: "/"
|
||||
state:
|
||||
description: State of the Healthcheck.
|
||||
required: true
|
||||
choices: ["present", "absent"]
|
||||
timeout:
|
||||
description:
|
||||
- How long (in seconds) to wait for a response before claiming
|
||||
failure. It is invalid for timeout
|
||||
to have a greater value than check_interval.
|
||||
default: 5
|
||||
unhealthy_threshold:
|
||||
description:
|
||||
- A so-far healthy instance will be marked unhealthy after this
|
||||
many consecutive failures.
|
||||
default: 2
|
||||
healthy_threshold:
|
||||
description:
|
||||
- A so-far unhealthy instance will be marked healthy after this
|
||||
many consecutive successes.
|
||||
default: 2
|
||||
service_account_email:
|
||||
description:
|
||||
- service account email
|
||||
service_account_permissions:
|
||||
description:
|
||||
- service account permissions (see
|
||||
U(https://cloud.google.com/sdk/gcloud/reference/compute/instances/create),
|
||||
--scopes section for detailed information)
|
||||
choices: [
|
||||
"bigquery", "cloud-platform", "compute-ro", "compute-rw",
|
||||
"useraccounts-ro", "useraccounts-rw", "datastore", "logging-write",
|
||||
"monitoring", "sql-admin", "storage-full", "storage-ro",
|
||||
"storage-rw", "taskqueue", "userinfo-email"
|
||||
]
|
||||
credentials_file:
|
||||
description:
|
||||
- Path to the JSON file associated with the service account email
|
||||
project_id:
|
||||
description:
|
||||
- Your GCP project ID
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: Create Minimum HealthCheck
|
||||
gcp_healthcheck:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
healthcheck_name: my-healthcheck
|
||||
healthcheck_type: HTTP
|
||||
state: present
|
||||
- name: Create HTTP HealthCheck
|
||||
gcp_healthcheck:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
healthcheck_name: my-healthcheck
|
||||
healthcheck_type: HTTP
|
||||
host: my-host
|
||||
request_path: /hc
|
||||
check_interval: 10
|
||||
timeout: 30
|
||||
unhealthy_threshhold: 2
|
||||
healthy_threshhold: 1
|
||||
state: present
|
||||
- name: Create HTTPS HealthCheck
|
||||
gcp_healthcheck:
|
||||
service_account_email: "{{ service_account_email }}"
|
||||
credentials_file: "{{ credentials_file }}"
|
||||
project_id: "{{ project_id }}"
|
||||
healthcheck_name: "{{ https_healthcheck }}"
|
||||
healthcheck_type: HTTPS
|
||||
host_header: my-host
|
||||
request_path: /hc
|
||||
check_interval: 5
|
||||
timeout: 5
|
||||
unhealthy_threshold: 2
|
||||
healthy_threshold: 1
|
||||
state: present
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
state:
|
||||
description: state of the Healthcheck
|
||||
returned: Always.
|
||||
type: str
|
||||
sample: present
|
||||
healthcheck_name:
|
||||
description: Name of the Healthcheck
|
||||
returned: Always
|
||||
type: str
|
||||
sample: my-url-map
|
||||
healthcheck_type:
|
||||
description: Type of the Healthcheck
|
||||
returned: Always
|
||||
type: str
|
||||
sample: HTTP
|
||||
healthcheck:
|
||||
description: GCP Healthcheck dictionary
|
||||
returned: Always. Refer to GCP documentation for detailed field descriptions.
|
||||
type: dict
|
||||
sample: { "name": "my-hc", "port": 443, "requestPath": "/foo" }
|
||||
'''
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.gcp import get_google_api_client, GCPUtils
|
||||
|
||||
|
||||
USER_AGENT_PRODUCT = 'ansible-healthcheck'
|
||||
USER_AGENT_VERSION = '0.0.1'
|
||||
|
||||
|
||||
def _validate_healthcheck_params(params):
|
||||
"""
|
||||
Validate healthcheck params.
|
||||
|
||||
Simple validation has already assumed by AnsibleModule.
|
||||
|
||||
:param params: Ansible dictionary containing configuration.
|
||||
:type params: ``dict``
|
||||
|
||||
:return: True or raises ValueError
|
||||
:rtype: ``bool`` or `class:ValueError`
|
||||
"""
|
||||
if params['timeout'] > params['check_interval']:
|
||||
raise ValueError("timeout (%s) is greater than check_interval (%s)" % (
|
||||
params['timeout'], params['check_interval']))
|
||||
|
||||
return (True, '')
|
||||
|
||||
|
||||
def _build_healthcheck_dict(params):
|
||||
"""
|
||||
Reformat services in Ansible Params for GCP.
|
||||
|
||||
:param params: Params from AnsibleModule object
|
||||
:type params: ``dict``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: dictionary suitable for submission to GCP
|
||||
HealthCheck (HTTP/HTTPS) API.
|
||||
:rtype ``dict``
|
||||
"""
|
||||
gcp_dict = GCPUtils.params_to_gcp_dict(params, 'healthcheck_name')
|
||||
if 'timeout' in gcp_dict:
|
||||
gcp_dict['timeoutSec'] = gcp_dict['timeout']
|
||||
del gcp_dict['timeout']
|
||||
|
||||
if 'checkInterval' in gcp_dict:
|
||||
gcp_dict['checkIntervalSec'] = gcp_dict['checkInterval']
|
||||
del gcp_dict['checkInterval']
|
||||
|
||||
if 'hostHeader' in gcp_dict:
|
||||
gcp_dict['host'] = gcp_dict['hostHeader']
|
||||
del gcp_dict['hostHeader']
|
||||
|
||||
if 'healthcheckType' in gcp_dict:
|
||||
del gcp_dict['healthcheckType']
|
||||
return gcp_dict
|
||||
|
||||
|
||||
def _get_req_resource(client, resource_type):
|
||||
if resource_type == 'HTTPS':
|
||||
return (client.httpsHealthChecks(), 'httpsHealthCheck')
|
||||
else:
|
||||
return (client.httpHealthChecks(), 'httpHealthCheck')
|
||||
|
||||
|
||||
def get_healthcheck(client, name, project_id=None, resource_type='HTTP'):
|
||||
"""
|
||||
Get a Healthcheck from GCP.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param name: Name of the Url Map.
|
||||
:type name: ``str``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: A dict resp from the respective GCP 'get' request.
|
||||
:rtype: ``dict``
|
||||
"""
|
||||
try:
|
||||
resource, entity_name = _get_req_resource(client, resource_type)
|
||||
args = {'project': project_id, entity_name: name}
|
||||
req = resource.get(**args)
|
||||
return GCPUtils.execute_api_client_req(req, raise_404=False)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def create_healthcheck(client, params, project_id, resource_type='HTTP'):
|
||||
"""
|
||||
Create a new Healthcheck.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param params: Dictionary of arguments from AnsibleModule.
|
||||
:type params: ``dict``
|
||||
|
||||
:return: Tuple with changed status and response dict
|
||||
:rtype: ``tuple`` in the format of (bool, dict)
|
||||
"""
|
||||
gcp_dict = _build_healthcheck_dict(params)
|
||||
try:
|
||||
resource, _ = _get_req_resource(client, resource_type)
|
||||
args = {'project': project_id, 'body': gcp_dict}
|
||||
req = resource.insert(**args)
|
||||
return_data = GCPUtils.execute_api_client_req(req, client, raw=False)
|
||||
if not return_data:
|
||||
return_data = get_healthcheck(client,
|
||||
name=params['healthcheck_name'],
|
||||
project_id=project_id)
|
||||
return (True, return_data)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def delete_healthcheck(client, name, project_id, resource_type='HTTP'):
|
||||
"""
|
||||
Delete a Healthcheck.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param name: Name of the Url Map.
|
||||
:type name: ``str``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: Tuple with changed status and response dict
|
||||
:rtype: ``tuple`` in the format of (bool, dict)
|
||||
"""
|
||||
try:
|
||||
resource, entity_name = _get_req_resource(client, resource_type)
|
||||
args = {'project': project_id, entity_name: name}
|
||||
req = resource.delete(**args)
|
||||
return_data = GCPUtils.execute_api_client_req(req, client)
|
||||
return (True, return_data)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def update_healthcheck(client, healthcheck, params, name, project_id,
|
||||
resource_type='HTTP'):
|
||||
"""
|
||||
Update a Healthcheck.
|
||||
|
||||
If the healthcheck has not changed, the update will not occur.
|
||||
|
||||
:param client: An initialized GCE Compute Discovery resource.
|
||||
:type client: :class: `googleapiclient.discovery.Resource`
|
||||
|
||||
:param healthcheck: Name of the Url Map.
|
||||
:type healthcheck: ``dict``
|
||||
|
||||
:param params: Dictionary of arguments from AnsibleModule.
|
||||
:type params: ``dict``
|
||||
|
||||
:param name: Name of the Url Map.
|
||||
:type name: ``str``
|
||||
|
||||
:param project_id: The GCP project ID.
|
||||
:type project_id: ``str``
|
||||
|
||||
:return: Tuple with changed status and response dict
|
||||
:rtype: ``tuple`` in the format of (bool, dict)
|
||||
"""
|
||||
gcp_dict = _build_healthcheck_dict(params)
|
||||
ans = GCPUtils.are_params_equal(healthcheck, gcp_dict)
|
||||
if ans:
|
||||
return (False, 'no update necessary')
|
||||
|
||||
try:
|
||||
resource, entity_name = _get_req_resource(client, resource_type)
|
||||
args = {'project': project_id, entity_name: name, 'body': gcp_dict}
|
||||
req = resource.update(**args)
|
||||
return_data = GCPUtils.execute_api_client_req(
|
||||
req, client=client, raw=False)
|
||||
return (True, return_data)
|
||||
except Exception:
|
||||
raise
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
healthcheck_name=dict(required=True),
|
||||
healthcheck_type=dict(required=True,
|
||||
choices=['HTTP', 'HTTPS']),
|
||||
request_path=dict(required=False, default='/'),
|
||||
check_interval=dict(required=False, type='int', default=5),
|
||||
healthy_threshold=dict(required=False, type='int', default=2),
|
||||
unhealthy_threshold=dict(required=False, type='int', default=2),
|
||||
host_header=dict(required=False, type='str', default=''),
|
||||
timeout=dict(required=False, type='int', default=5),
|
||||
port=dict(required=False, type='int'),
|
||||
state=dict(choices=['absent', 'present'], default='present'),
|
||||
service_account_email=dict(),
|
||||
service_account_permissions=dict(type='list'),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ), )
|
||||
|
||||
client, conn_params = get_google_api_client(module, 'compute', user_agent_product=USER_AGENT_PRODUCT,
|
||||
user_agent_version=USER_AGENT_VERSION)
|
||||
|
||||
params = {}
|
||||
|
||||
params['healthcheck_name'] = module.params.get('healthcheck_name')
|
||||
params['healthcheck_type'] = module.params.get('healthcheck_type')
|
||||
params['request_path'] = module.params.get('request_path')
|
||||
params['check_interval'] = module.params.get('check_interval')
|
||||
params['healthy_threshold'] = module.params.get('healthy_threshold')
|
||||
params['unhealthy_threshold'] = module.params.get('unhealthy_threshold')
|
||||
params['host_header'] = module.params.get('host_header')
|
||||
params['timeout'] = module.params.get('timeout')
|
||||
params['port'] = module.params.get('port', None)
|
||||
params['state'] = module.params.get('state')
|
||||
|
||||
if not params['port']:
|
||||
params['port'] = 80
|
||||
if params['healthcheck_type'] == 'HTTPS':
|
||||
params['port'] = 443
|
||||
try:
|
||||
_validate_healthcheck_params(params)
|
||||
except Exception as e:
|
||||
module.fail_json(msg=e.message, changed=False)
|
||||
|
||||
changed = False
|
||||
json_output = {'state': params['state']}
|
||||
healthcheck = get_healthcheck(client,
|
||||
name=params['healthcheck_name'],
|
||||
project_id=conn_params['project_id'],
|
||||
resource_type=params['healthcheck_type'])
|
||||
|
||||
if not healthcheck:
|
||||
if params['state'] == 'absent':
|
||||
# Doesn't exist in GCE, and state==absent.
|
||||
changed = False
|
||||
module.fail_json(
|
||||
msg="Cannot delete unknown healthcheck: %s" %
|
||||
(params['healthcheck_name']))
|
||||
else:
|
||||
# Create
|
||||
changed, json_output['healthcheck'] = create_healthcheck(client,
|
||||
params=params,
|
||||
project_id=conn_params['project_id'],
|
||||
resource_type=params['healthcheck_type'])
|
||||
elif params['state'] == 'absent':
|
||||
# Delete
|
||||
changed, json_output['healthcheck'] = delete_healthcheck(client,
|
||||
name=params['healthcheck_name'],
|
||||
project_id=conn_params['project_id'],
|
||||
resource_type=params['healthcheck_type'])
|
||||
else:
|
||||
changed, json_output['healthcheck'] = update_healthcheck(client,
|
||||
healthcheck=healthcheck,
|
||||
params=params,
|
||||
name=params['healthcheck_name'],
|
||||
project_id=conn_params['project_id'],
|
||||
resource_type=params['healthcheck_type'])
|
||||
json_output['changed'] = changed
|
||||
json_output.update(params)
|
||||
module.exit_json(**json_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -21,7 +21,7 @@ requirements:
|
|||
- "google-auth >= 0.9.0"
|
||||
- "google-auth-httplib2 >= 0.0.2"
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_compute_target_http_proxy) instead.
|
||||
notes:
|
||||
|
|
|
@ -26,7 +26,7 @@ notes:
|
|||
author:
|
||||
- "Tom Melendez (@supertom) <tom@supertom.com>"
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_compute_url_map) instead.
|
||||
options:
|
||||
|
|
|
@ -1,328 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright: (c) 2016, Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: gcpubsub
|
||||
short_description: Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub
|
||||
description:
|
||||
- Create and Delete Topics/Subscriptions, Publish and pull messages on PubSub.
|
||||
See U(https://cloud.google.com/pubsub/docs) for an overview.
|
||||
requirements:
|
||||
- google-auth >= 0.5.0
|
||||
- google-cloud-pubsub >= 0.22.0
|
||||
notes:
|
||||
- Subscription pull happens before publish. You cannot publish and pull in the same task.
|
||||
author:
|
||||
- Tom Melendez (@supertom) <tom@supertom.com>
|
||||
options:
|
||||
topic:
|
||||
description:
|
||||
- GCP pubsub topic name.
|
||||
- Only the name, not the full path, is required.
|
||||
required: yes
|
||||
subscription:
|
||||
description:
|
||||
- Dictionary containing a subscription name associated with a topic (required), along with optional ack_deadline, push_endpoint and pull.
|
||||
For pulling from a subscription, message_ack (bool), max_messages (int) and return_immediate are available as subfields.
|
||||
See subfields name, push_endpoint and ack_deadline for more information.
|
||||
name:
|
||||
description: Subfield of subscription. Required if subscription is specified. See examples.
|
||||
ack_deadline:
|
||||
description: Subfield of subscription. Not required. Default deadline for subscriptions to ACK the message before it is resent. See examples.
|
||||
pull:
|
||||
description:
|
||||
- Subfield of subscription. Not required. If specified, messages will be retrieved from topic via the provided subscription name.
|
||||
max_messages (int; default None; max number of messages to pull), message_ack (bool; default False; acknowledge the message) and return_immediately
|
||||
(bool; default True, don't wait for messages to appear). If the messages are acknowledged, changed is set to True, otherwise, changed is False.
|
||||
push_endpoint:
|
||||
description:
|
||||
- Subfield of subscription. Not required. If specified, message will be sent to an endpoint.
|
||||
See U(https://cloud.google.com/pubsub/docs/advanced#push_endpoints) for more information.
|
||||
publish:
|
||||
description:
|
||||
- List of dictionaries describing messages and attributes to be published. Dictionary is in message(str):attributes(dict) format.
|
||||
Only message is required.
|
||||
state:
|
||||
description:
|
||||
- State of the topic or queue.
|
||||
- Applies to the most granular resource.
|
||||
- If subscription isspecified we remove it.
|
||||
- If only topic is specified, that is what is removed.
|
||||
- NOTE - A topic can be removed without first removing the subscription.
|
||||
choices: [ absent, present ]
|
||||
default: present
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# (Message will be pushed; there is no check to see if the message was pushed before
|
||||
- name: Create a topic and publish a message to it
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
state: present
|
||||
|
||||
# Subscriptions associated with topic are not deleted.
|
||||
- name: Delete Topic
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
state: absent
|
||||
|
||||
# Setting absent will keep the messages from being sent
|
||||
- name: Publish multiple messages, with attributes (key:value available with the message)
|
||||
gcpubsub:
|
||||
topic: '{{ topic_name }}'
|
||||
state: present
|
||||
publish:
|
||||
- message: this is message 1
|
||||
attributes:
|
||||
mykey1: myvalue
|
||||
mykey2: myvalu2
|
||||
mykey3: myvalue3
|
||||
- message: this is message 2
|
||||
attributes:
|
||||
server: prod
|
||||
sla: "99.9999"
|
||||
owner: fred
|
||||
|
||||
- name: Create Subscription (pull)
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
subscription:
|
||||
- name: mysub
|
||||
state: present
|
||||
|
||||
# pull is default, ack_deadline is not required
|
||||
- name: Create Subscription with ack_deadline and push endpoint
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
subscription:
|
||||
- name: mysub
|
||||
ack_deadline: "60"
|
||||
push_endpoint: http://pushendpoint.example.com
|
||||
state: present
|
||||
|
||||
# Setting push_endpoint to "None" converts subscription to pull.
|
||||
- name: Subscription change from push to pull
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
subscription:
|
||||
name: mysub
|
||||
push_endpoint: "None"
|
||||
|
||||
### Topic will not be deleted
|
||||
- name: Delete subscription
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
subscription:
|
||||
- name: mysub
|
||||
state: absent
|
||||
|
||||
# only pull keyword is required.
|
||||
- name: Pull messages from subscription
|
||||
gcpubsub:
|
||||
topic: ansible-topic-example
|
||||
subscription:
|
||||
name: ansible-topic-example-sub
|
||||
pull:
|
||||
message_ack: yes
|
||||
max_messages: "100"
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
publish:
|
||||
description: List of dictionaries describing messages and attributes to be published. Dictionary is in message(str):attributes(dict) format.
|
||||
Only message is required.
|
||||
returned: Only when specified
|
||||
type: list
|
||||
sample: "publish: ['message': 'my message', attributes: {'key1': 'value1'}]"
|
||||
|
||||
pulled_messages:
|
||||
description: list of dictionaries containing message info. Fields are ack_id, attributes, data, message_id.
|
||||
returned: Only when subscription.pull is specified
|
||||
type: list
|
||||
sample: [{ "ack_id": "XkASTCcYREl...","attributes": {"key1": "val1",...}, "data": "this is message 1", "message_id": "49107464153705"},..]
|
||||
|
||||
state:
|
||||
description: The state of the topic or subscription. Value will be either 'absent' or 'present'.
|
||||
returned: Always
|
||||
type: str
|
||||
sample: "present"
|
||||
|
||||
subscription:
|
||||
description: Name of subscription.
|
||||
returned: When subscription fields are specified
|
||||
type: str
|
||||
sample: "mysubscription"
|
||||
|
||||
topic:
|
||||
description: Name of topic.
|
||||
returned: Always
|
||||
type: str
|
||||
sample: "mytopic"
|
||||
'''
|
||||
|
||||
try:
|
||||
from ast import literal_eval
|
||||
HAS_PYTHON26 = True
|
||||
except ImportError:
|
||||
HAS_PYTHON26 = False
|
||||
|
||||
try:
|
||||
from google.cloud import pubsub
|
||||
HAS_GOOGLE_CLOUD_PUBSUB = True
|
||||
except ImportError as e:
|
||||
HAS_GOOGLE_CLOUD_PUBSUB = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.gcp import check_min_pkg_version, get_google_cloud_credentials
|
||||
|
||||
|
||||
CLOUD_CLIENT = 'google-cloud-pubsub'
|
||||
CLOUD_CLIENT_MINIMUM_VERSION = '0.22.0'
|
||||
CLOUD_CLIENT_USER_AGENT = 'ansible-pubsub-0.1'
|
||||
|
||||
|
||||
def publish_messages(message_list, topic):
|
||||
with topic.batch() as batch:
|
||||
for message in message_list:
|
||||
msg = message['message']
|
||||
attrs = {}
|
||||
if 'attributes' in message:
|
||||
attrs = message['attributes']
|
||||
batch.publish(bytes(msg), **attrs)
|
||||
return True
|
||||
|
||||
|
||||
def pull_messages(pull_params, sub):
|
||||
"""
|
||||
:rtype: tuple (output, changed)
|
||||
"""
|
||||
changed = False
|
||||
max_messages = pull_params.get('max_messages', None)
|
||||
message_ack = pull_params.get('message_ack', 'no')
|
||||
return_immediately = pull_params.get('return_immediately', False)
|
||||
|
||||
output = []
|
||||
pulled = sub.pull(return_immediately=return_immediately, max_messages=max_messages)
|
||||
|
||||
for ack_id, msg in pulled:
|
||||
msg_dict = {'message_id': msg.message_id,
|
||||
'attributes': msg.attributes,
|
||||
'data': msg.data,
|
||||
'ack_id': ack_id}
|
||||
output.append(msg_dict)
|
||||
|
||||
if message_ack:
|
||||
ack_ids = [m['ack_id'] for m in output]
|
||||
if ack_ids:
|
||||
sub.acknowledge(ack_ids)
|
||||
changed = True
|
||||
return (output, changed)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
topic=dict(type='str', required=True),
|
||||
state=dict(type='str', default='present', choices=['absent', 'present']),
|
||||
publish=dict(type='list'),
|
||||
subscription=dict(type='dict'),
|
||||
service_account_email=dict(type='str'),
|
||||
credentials_file=dict(type='str'),
|
||||
project_id=dict(type='str'),
|
||||
),
|
||||
)
|
||||
|
||||
if not HAS_PYTHON26:
|
||||
module.fail_json(
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
|
||||
if not HAS_GOOGLE_CLOUD_PUBSUB:
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library.")
|
||||
|
||||
if not check_min_pkg_version(CLOUD_CLIENT, CLOUD_CLIENT_MINIMUM_VERSION):
|
||||
module.fail_json(msg="Please install %s client version %s" % (CLOUD_CLIENT, CLOUD_CLIENT_MINIMUM_VERSION))
|
||||
|
||||
mod_params = {}
|
||||
mod_params['publish'] = module.params.get('publish')
|
||||
mod_params['state'] = module.params.get('state')
|
||||
mod_params['topic'] = module.params.get('topic')
|
||||
mod_params['subscription'] = module.params.get('subscription')
|
||||
|
||||
creds, params = get_google_cloud_credentials(module)
|
||||
pubsub_client = pubsub.Client(project=params['project_id'], credentials=creds, use_gax=False)
|
||||
pubsub_client.user_agent = CLOUD_CLIENT_USER_AGENT
|
||||
|
||||
changed = False
|
||||
json_output = {}
|
||||
|
||||
t = None
|
||||
if mod_params['topic']:
|
||||
t = pubsub_client.topic(mod_params['topic'])
|
||||
s = None
|
||||
if mod_params['subscription']:
|
||||
# Note: default ack deadline cannot be changed without deleting/recreating subscription
|
||||
s = t.subscription(mod_params['subscription']['name'],
|
||||
ack_deadline=mod_params['subscription'].get('ack_deadline', None),
|
||||
push_endpoint=mod_params['subscription'].get('push_endpoint', None))
|
||||
|
||||
if mod_params['state'] == 'absent':
|
||||
# Remove the most granular resource. If subscription is specified
|
||||
# we remove it. If only topic is specified, that is what is removed.
|
||||
# Note that a topic can be removed without first removing the subscription.
|
||||
# TODO(supertom): Enhancement: Provide an option to only delete a topic
|
||||
# if there are no subscriptions associated with it (which the API does not support).
|
||||
if s is not None:
|
||||
if s.exists():
|
||||
s.delete()
|
||||
changed = True
|
||||
else:
|
||||
if t.exists():
|
||||
t.delete()
|
||||
changed = True
|
||||
elif mod_params['state'] == 'present':
|
||||
if not t.exists():
|
||||
t.create()
|
||||
changed = True
|
||||
if s:
|
||||
if not s.exists():
|
||||
s.create()
|
||||
s.reload()
|
||||
changed = True
|
||||
else:
|
||||
# Subscription operations
|
||||
# TODO(supertom): if more 'update' operations arise, turn this into a function.
|
||||
s.reload()
|
||||
push_endpoint = mod_params['subscription'].get('push_endpoint', None)
|
||||
if push_endpoint is not None:
|
||||
if push_endpoint != s.push_endpoint:
|
||||
if push_endpoint == 'None':
|
||||
push_endpoint = None
|
||||
s.modify_push_configuration(push_endpoint=push_endpoint)
|
||||
s.reload()
|
||||
changed = push_endpoint == s.push_endpoint
|
||||
|
||||
if 'pull' in mod_params['subscription']:
|
||||
if s.push_endpoint is not None:
|
||||
module.fail_json(msg="Cannot pull messages, push_endpoint is configured.")
|
||||
(json_output['pulled_messages'], changed) = pull_messages(
|
||||
mod_params['subscription']['pull'], s)
|
||||
|
||||
# publish messages to the topic
|
||||
if mod_params['publish'] and len(mod_params['publish']) > 0:
|
||||
changed = publish_messages(mod_params['publish'], t)
|
||||
|
||||
json_output['changed'] = changed
|
||||
json_output.update(mod_params)
|
||||
module.exit_json(**json_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1 +0,0 @@
|
|||
gcpubsub_info.py
|
150
plugins/modules/cloud/google/gcpubsub_facts.py
Normal file
150
plugins/modules/cloud/google/gcpubsub_facts.py
Normal file
|
@ -0,0 +1,150 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright 2016 Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: gcpubsub_facts
|
||||
deprecated:
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: The module does not return Ansible facts
|
||||
alternative: Use C(gcpubsub_info) from the C(google.cloud) collection instead
|
||||
short_description: List Topics/Subscriptions and Messages from Google PubSub.
|
||||
description:
|
||||
- List Topics/Subscriptions from Google PubSub. Use the gcpubsub module for
|
||||
topic/subscription management.
|
||||
See U(https://cloud.google.com/pubsub/docs) for an overview.
|
||||
- This module was called C(gcpubsub_facts) before Ansible 2.9. The usage did not change.
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "google-auth >= 0.5.0"
|
||||
- "google-cloud-pubsub >= 0.22.0"
|
||||
notes:
|
||||
- list state enables user to list topics or subscriptions in the project. See examples for details.
|
||||
author:
|
||||
- "Tom Melendez (@supertom) <tom@supertom.com>"
|
||||
options:
|
||||
topic:
|
||||
description:
|
||||
- GCP pubsub topic name. Only the name, not the full path, is required.
|
||||
required: False
|
||||
view:
|
||||
description:
|
||||
- Choices are 'topics' or 'subscriptions'
|
||||
required: True
|
||||
state:
|
||||
description:
|
||||
- list is the only valid option.
|
||||
required: False
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: List all Topics in a project
|
||||
gcpubsub_info:
|
||||
view: topics
|
||||
state: list
|
||||
|
||||
- name: List all Subscriptions in a project
|
||||
gcpubsub_info:
|
||||
view: subscriptions
|
||||
state: list
|
||||
|
||||
- name: List all Subscriptions for a Topic in a project
|
||||
gcpubsub_info:
|
||||
view: subscriptions
|
||||
topic: my-topic
|
||||
state: list
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
subscriptions:
|
||||
description: List of subscriptions.
|
||||
returned: When view is set to subscriptions.
|
||||
type: list
|
||||
sample: ["mysubscription", "mysubscription2"]
|
||||
topic:
|
||||
description: Name of topic. Used to filter subscriptions.
|
||||
returned: Always
|
||||
type: str
|
||||
sample: "mytopic"
|
||||
topics:
|
||||
description: List of topics.
|
||||
returned: When view is set to topics.
|
||||
type: list
|
||||
sample: ["mytopic", "mytopic2"]
|
||||
'''
|
||||
|
||||
try:
|
||||
from ast import literal_eval
|
||||
HAS_PYTHON26 = True
|
||||
except ImportError:
|
||||
HAS_PYTHON26 = False
|
||||
|
||||
try:
|
||||
from google.cloud import pubsub
|
||||
HAS_GOOGLE_CLOUD_PUBSUB = True
|
||||
except ImportError as e:
|
||||
HAS_GOOGLE_CLOUD_PUBSUB = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.gcp import check_min_pkg_version, get_google_cloud_credentials
|
||||
|
||||
|
||||
def list_func(data, member='name'):
|
||||
"""Used for state=list."""
|
||||
return [getattr(x, member) for x in data]
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
view=dict(choices=['topics', 'subscriptions'], default='topics'),
|
||||
topic=dict(required=False),
|
||||
state=dict(choices=['list'], default='list'),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
if module._name in ('gcpubsub_facts', 'community.general.gcpubsub_facts'):
|
||||
module.deprecate("The 'gcpubsub_facts' module has been renamed to 'gcpubsub_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
if not HAS_PYTHON26:
|
||||
module.fail_json(
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
|
||||
if not HAS_GOOGLE_CLOUD_PUBSUB:
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library.")
|
||||
|
||||
CLIENT_MINIMUM_VERSION = '0.22.0'
|
||||
if not check_min_pkg_version('google-cloud-pubsub', CLIENT_MINIMUM_VERSION):
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library version %s" % CLIENT_MINIMUM_VERSION)
|
||||
|
||||
mod_params = {}
|
||||
mod_params['state'] = module.params.get('state')
|
||||
mod_params['topic'] = module.params.get('topic')
|
||||
mod_params['view'] = module.params.get('view')
|
||||
|
||||
creds, params = get_google_cloud_credentials(module)
|
||||
pubsub_client = pubsub.Client(project=params['project_id'], credentials=creds, use_gax=False)
|
||||
pubsub_client.user_agent = 'ansible-pubsub-0.1'
|
||||
|
||||
json_output = {}
|
||||
if mod_params['view'] == 'topics':
|
||||
json_output['topics'] = list_func(pubsub_client.list_topics())
|
||||
elif mod_params['view'] == 'subscriptions':
|
||||
if mod_params['topic']:
|
||||
t = pubsub_client.topic(mod_params['topic'])
|
||||
json_output['subscriptions'] = list_func(t.list_subscriptions())
|
||||
else:
|
||||
json_output['subscriptions'] = list_func(pubsub_client.list_subscriptions())
|
||||
|
||||
json_output['changed'] = False
|
||||
json_output.update(mod_params)
|
||||
module.exit_json(**json_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,145 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
# Copyright 2016 Google Inc.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: gcpubsub_info
|
||||
short_description: List Topics/Subscriptions and Messages from Google PubSub.
|
||||
description:
|
||||
- List Topics/Subscriptions from Google PubSub. Use the gcpubsub module for
|
||||
topic/subscription management.
|
||||
See U(https://cloud.google.com/pubsub/docs) for an overview.
|
||||
- This module was called C(gcpubsub_facts) before Ansible 2.9. The usage did not change.
|
||||
requirements:
|
||||
- "python >= 2.6"
|
||||
- "google-auth >= 0.5.0"
|
||||
- "google-cloud-pubsub >= 0.22.0"
|
||||
notes:
|
||||
- list state enables user to list topics or subscriptions in the project. See examples for details.
|
||||
author:
|
||||
- "Tom Melendez (@supertom) <tom@supertom.com>"
|
||||
options:
|
||||
topic:
|
||||
description:
|
||||
- GCP pubsub topic name. Only the name, not the full path, is required.
|
||||
required: False
|
||||
view:
|
||||
description:
|
||||
- Choices are 'topics' or 'subscriptions'
|
||||
required: True
|
||||
state:
|
||||
description:
|
||||
- list is the only valid option.
|
||||
required: False
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: List all Topics in a project
|
||||
gcpubsub_info:
|
||||
view: topics
|
||||
state: list
|
||||
|
||||
- name: List all Subscriptions in a project
|
||||
gcpubsub_info:
|
||||
view: subscriptions
|
||||
state: list
|
||||
|
||||
- name: List all Subscriptions for a Topic in a project
|
||||
gcpubsub_info:
|
||||
view: subscriptions
|
||||
topic: my-topic
|
||||
state: list
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
subscriptions:
|
||||
description: List of subscriptions.
|
||||
returned: When view is set to subscriptions.
|
||||
type: list
|
||||
sample: ["mysubscription", "mysubscription2"]
|
||||
topic:
|
||||
description: Name of topic. Used to filter subscriptions.
|
||||
returned: Always
|
||||
type: str
|
||||
sample: "mytopic"
|
||||
topics:
|
||||
description: List of topics.
|
||||
returned: When view is set to topics.
|
||||
type: list
|
||||
sample: ["mytopic", "mytopic2"]
|
||||
'''
|
||||
|
||||
try:
|
||||
from ast import literal_eval
|
||||
HAS_PYTHON26 = True
|
||||
except ImportError:
|
||||
HAS_PYTHON26 = False
|
||||
|
||||
try:
|
||||
from google.cloud import pubsub
|
||||
HAS_GOOGLE_CLOUD_PUBSUB = True
|
||||
except ImportError as e:
|
||||
HAS_GOOGLE_CLOUD_PUBSUB = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.gcp import check_min_pkg_version, get_google_cloud_credentials
|
||||
|
||||
|
||||
def list_func(data, member='name'):
|
||||
"""Used for state=list."""
|
||||
return [getattr(x, member) for x in data]
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(
|
||||
view=dict(choices=['topics', 'subscriptions'], default='topics'),
|
||||
topic=dict(required=False),
|
||||
state=dict(choices=['list'], default='list'),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
if module._name in ('gcpubsub_facts', 'community.general.gcpubsub_facts'):
|
||||
module.deprecate("The 'gcpubsub_facts' module has been renamed to 'gcpubsub_info'", version='2.13')
|
||||
|
||||
if not HAS_PYTHON26:
|
||||
module.fail_json(
|
||||
msg="GCE module requires python's 'ast' module, python v2.6+")
|
||||
|
||||
if not HAS_GOOGLE_CLOUD_PUBSUB:
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library.")
|
||||
|
||||
CLIENT_MINIMUM_VERSION = '0.22.0'
|
||||
if not check_min_pkg_version('google-cloud-pubsub', CLIENT_MINIMUM_VERSION):
|
||||
module.fail_json(msg="Please install google-cloud-pubsub library version %s" % CLIENT_MINIMUM_VERSION)
|
||||
|
||||
mod_params = {}
|
||||
mod_params['state'] = module.params.get('state')
|
||||
mod_params['topic'] = module.params.get('topic')
|
||||
mod_params['view'] = module.params.get('view')
|
||||
|
||||
creds, params = get_google_cloud_credentials(module)
|
||||
pubsub_client = pubsub.Client(project=params['project_id'], credentials=creds, use_gax=False)
|
||||
pubsub_client.user_agent = 'ansible-pubsub-0.1'
|
||||
|
||||
json_output = {}
|
||||
if mod_params['view'] == 'topics':
|
||||
json_output['topics'] = list_func(pubsub_client.list_topics())
|
||||
elif mod_params['view'] == 'subscriptions':
|
||||
if mod_params['topic']:
|
||||
t = pubsub_client.topic(mod_params['topic'])
|
||||
json_output['subscriptions'] = list_func(t.list_subscriptions())
|
||||
else:
|
||||
json_output['subscriptions'] = list_func(pubsub_client.list_subscriptions())
|
||||
|
||||
json_output['changed'] = False
|
||||
json_output.update(mod_params)
|
||||
module.exit_json(**json_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -21,7 +21,7 @@ requirements:
|
|||
notes:
|
||||
- Changing the configuration on an existing instance is not supported.
|
||||
deprecated:
|
||||
removed_in: "2.12"
|
||||
removed_in: 2.0.0 # was Ansible 2.12
|
||||
why: Updated modules released with increased functionality
|
||||
alternative: Use M(gcp_spanner_database) and/or M(gcp_spanner_instance) instead.
|
||||
author:
|
||||
|
|
|
@ -150,7 +150,8 @@ def main():
|
|||
supports_check_mode=False
|
||||
)
|
||||
if module._name in ('memset_memstore_facts', 'community.general.memset_memstore_facts'):
|
||||
module.deprecate("The 'memset_memstore_facts' module has been renamed to 'memset_memstore_info'", version='2.13')
|
||||
module.deprecate("The 'memset_memstore_facts' module has been renamed to 'memset_memstore_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
# populate the dict with the user-provided vars.
|
||||
args = dict()
|
||||
|
|
|
@ -275,7 +275,8 @@ def main():
|
|||
supports_check_mode=False
|
||||
)
|
||||
if module._name in ('memset_server_facts', 'community.general.memset_server_facts'):
|
||||
module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'", version='2.13')
|
||||
module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
# populate the dict with the user-provided vars.
|
||||
args = dict()
|
||||
|
|
|
@ -10,9 +10,9 @@ __metaclass__ = type
|
|||
DOCUMENTATION = '''
|
||||
---
|
||||
deprecated:
|
||||
removed_in: '2.14'
|
||||
removed_in: 3.0.0 # was Ansible 2.14
|
||||
why: For more details https://github.com/ansible/ansible/issues/61546.
|
||||
alternative: Use M(helm) in kubernetes collection instead.
|
||||
alternative: Use M(helm) in the community.kubernetes collection instead.
|
||||
module: helm
|
||||
short_description: Manages Kubernetes packages with the Helm package manager
|
||||
author: "Flavio Percoco (@flaper87)"
|
||||
|
|
|
@ -13,7 +13,7 @@ author:
|
|||
- Vincent Van der Kussen (@vincentvdk)
|
||||
short_description: oVirt/RHEV platform management
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.14
|
||||
why: This module is for deprecated version of ovirt.
|
||||
alternative: Use C(ovirt_vm) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: online_server_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(online_server_info) instead.
|
||||
short_description: Gather facts about Online servers.
|
||||
|
|
|
@ -10,7 +10,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: online_user_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(online_user_info) instead.
|
||||
short_description: Gather facts about Online user.
|
||||
|
|
|
@ -256,7 +256,8 @@ def main():
|
|||
mutually_exclusive=[['ids', 'name']],
|
||||
supports_check_mode=True)
|
||||
if module._name in ('one_image_facts', 'community.general.one_image_facts'):
|
||||
module.deprecate("The 'one_image_facts' module has been renamed to 'one_image_info'", version='2.13')
|
||||
module.deprecate("The 'one_image_facts' module has been renamed to 'one_image_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
if not HAS_PYONE:
|
||||
module.fail_json(msg='This module requires pyone to work!')
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_affinity_label_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV affinity labels
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_affinity_label_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -134,7 +134,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module: ovirt_api_facts
|
|||
short_description: Retrieve information about the oVirt/RHV API
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_api_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -70,7 +70,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
check_sdk(module)
|
||||
|
||||
try:
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_cluster_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV clusters
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_cluster_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -93,7 +93,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_cluster_facts', 'community.general.ovirt_cluster_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_cluster_facts' module has been renamed to 'ovirt_cluster_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module: ovirt_datacenter_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV datacenters
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_datacenter_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -76,7 +76,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_datacenter_facts', 'community.general.ovirt_datacenter_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_datacenter_facts' module has been renamed to 'ovirt_datacenter_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_disk_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV disks
|
||||
author: "Katerina Koukiou (@KKoukiou)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_disk_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -92,7 +92,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_disk_facts', 'community.general.ovirt_disk_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_disk_facts' module has been renamed to 'ovirt_disk_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
check_sdk(module)
|
||||
|
||||
try:
|
||||
|
|
|
@ -12,7 +12,7 @@ module: ovirt_event_facts
|
|||
short_description: This module can be used to retrieve information about one or more oVirt/RHV events
|
||||
author: "Chris Keller (@nasx)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_event_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -129,7 +129,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_event_facts', 'community.general.ovirt_event_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_event_facts' module has been renamed to 'ovirt_event_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_external_provider_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV external providers
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_external_provider_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -124,7 +124,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_external_provider_facts', 'community.general.ovirt_external_provider_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_external_provider_facts' module has been renamed to 'ovirt_external_provider_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_group_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV groups
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_group_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -91,7 +91,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_group_facts', 'community.general.ovirt_group_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_group_facts' module has been renamed to 'ovirt_group_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module: ovirt_host_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV hosts
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_host_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -111,7 +111,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_host_facts', 'community.general.ovirt_host_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module: ovirt_host_storage_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)
|
||||
author: "Daniel Erez (@derez)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_host_storage_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -133,7 +133,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_host_storage_facts', 'community.general.ovirt_host_storage_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_host_storage_facts' module has been renamed to 'ovirt_host_storage_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
check_sdk(module)
|
||||
|
||||
try:
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_network_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV networks
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_network_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -93,7 +93,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_network_facts', 'community.general.ovirt_network_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_network_facts' module has been renamed to 'ovirt_network_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_nic_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV virtual machine network interfaces
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_nic_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -98,7 +98,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_nic_facts', 'community.general.ovirt_nic_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_nic_facts' module has been renamed to 'ovirt_nic_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_permission_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV permissions
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_permission_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -135,7 +135,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_permission_facts', 'community.general.ovirt_permission_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_permission_facts' module has been renamed to 'ovirt_permission_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_quota_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV quotas
|
||||
author: "Maor Lipchuk (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_quota_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -98,7 +98,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_quota_facts', 'community.general.ovirt_quota_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_quota_facts' module has been renamed to 'ovirt_quota_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_scheduling_policy_facts
|
|||
short_description: Retrieve information about one or more oVirt scheduling policies
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_scheduling_policy_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -98,7 +98,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_scheduling_policy_facts', 'community.general.ovirt_scheduling_policy_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_scheduling_policy_facts' module has been renamed to 'ovirt_scheduling_policy_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module: ovirt_snapshot_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV virtual machine snapshots
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_snapshot_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -88,7 +88,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_snapshot_facts', 'community.general.ovirt_snapshot_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_snapshot_facts' module has been renamed to 'ovirt_snapshot_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_storage_domain_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV storage domains
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_storage_domain_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -94,7 +94,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_storage_domain_facts', 'community.general.ovirt_storage_domain_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_storage_domain_facts' module has been renamed to 'ovirt_storage_domain_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_storage_template_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
|
||||
author: "Maor Lipchuk (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_storage_template_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -102,7 +102,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_storage_template_facts', 'community.general.ovirt_storage_template_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_storage_template_facts' module has been renamed to 'ovirt_storage_template_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_storage_vm_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
|
||||
author: "Maor Lipchuk (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_storage_vm_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -102,7 +102,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_storage_vm_facts', 'community.general.ovirt_storage_vm_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_storage_vm_facts' module has been renamed to 'ovirt_storage_vm_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_tag_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV tags
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_tag_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -118,7 +118,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_tag_facts', 'community.general.ovirt_tag_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_tag_facts' module has been renamed to 'ovirt_tag_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_template_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV templates
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_template_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -92,7 +92,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_template_facts', 'community.general.ovirt_template_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_template_facts' module has been renamed to 'ovirt_template_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_user_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV users
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_user_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -91,7 +91,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_user_facts', 'community.general.ovirt_user_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_user_facts' module has been renamed to 'ovirt_user_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_vm_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV virtual machines
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_vm_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -125,7 +125,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_vm_facts', 'community.general.ovirt_vm_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_vm_facts' module has been renamed to 'ovirt_vm_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ module: ovirt_vmpool_facts
|
|||
short_description: Retrieve information about one or more oVirt/RHV vmpools
|
||||
author: "Ondra Machacek (@machacekondra)"
|
||||
deprecated:
|
||||
removed_in: "2.14"
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: When migrating to collection we decided to use only _info modules.
|
||||
alternative: Use C(ovirt_vmpool_info) from the C(ovirt.ovirt) collection instead
|
||||
description:
|
||||
|
@ -91,7 +91,8 @@ def main():
|
|||
is_old_facts = module._name in ('ovirt_vmpool_facts', 'community.general.ovirt_vmpool_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_vmpool_facts' module has been renamed to 'ovirt_vmpool_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
check_sdk(module)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_image_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_image_info) instead.
|
||||
short_description: Gather facts about the Scaleway images available.
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_ip_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_ip_info) instead.
|
||||
short_description: Gather facts about the Scaleway ips available.
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_organization_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_organization_info) instead.
|
||||
short_description: Gather facts about the Scaleway organizations available.
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_security_group_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_security_group_info) instead.
|
||||
short_description: Gather facts about the Scaleway security groups available.
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_server_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_server_info) instead.
|
||||
short_description: Gather facts about the Scaleway servers available.
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_snapshot_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_snapshot_info) instead.
|
||||
short_description: Gather facts about the Scaleway snapshots available.
|
||||
|
|
|
@ -11,7 +11,7 @@ DOCUMENTATION = r'''
|
|||
---
|
||||
module: scaleway_volume_facts
|
||||
deprecated:
|
||||
removed_in: '2.13'
|
||||
removed_in: 3.0.0 # was Ansible 2.13
|
||||
why: Deprecated in favour of C(_info) module.
|
||||
alternative: Use M(scaleway_volume_info) instead.
|
||||
short_description: Gather facts about the Scaleway volumes available.
|
||||
|
|
|
@ -48,7 +48,7 @@ EXAMPLES = '''
|
|||
|
||||
# When the module is called as smartos_image_facts, return values are published
|
||||
# in ansible_facts['smartos_images'] and can be used as follows.
|
||||
# Note that this is deprecated and will stop working in Ansible 2.13.
|
||||
# Note that this is deprecated and will stop working in community.general 3.0.0.
|
||||
- name: Print information
|
||||
debug:
|
||||
msg: "{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }}
|
||||
|
@ -107,7 +107,8 @@ def main():
|
|||
is_old_facts = module._name in ('smartos_image_facts', 'community.general.smartos_image_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'smartos_image_facts' module has been renamed to 'smartos_image_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
image_facts = ImageFacts(module)
|
||||
|
||||
|
|
|
@ -206,7 +206,8 @@ def main():
|
|||
)
|
||||
|
||||
if module._name in ('xenserver_guest_facts', 'community.general.xenserver_guest_facts'):
|
||||
module.deprecate("The 'xenserver_guest_facts' module has been renamed to 'xenserver_guest_info'", version='2.13')
|
||||
module.deprecate("The 'xenserver_guest_facts' module has been renamed to 'xenserver_guest_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
result = {'failed': False, 'changed': False}
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ EXAMPLES = r'''
|
|||
type: foreign_data_wrapper
|
||||
role: reader
|
||||
|
||||
# Available since version 2.10
|
||||
# Available since Ansible 2.10
|
||||
- name: GRANT ALL PRIVILEGES ON TYPE customtype TO reader
|
||||
postgresql_privs:
|
||||
db: test
|
||||
|
@ -359,7 +359,7 @@ EXAMPLES = r'''
|
|||
objs: ALL_IN_SCHEMA
|
||||
schema: common
|
||||
|
||||
# Available since version 2.8
|
||||
# Available since Ansible 2.8
|
||||
# ALTER DEFAULT PRIVILEGES FOR ROLE librarian IN SCHEMA library GRANT SELECT ON TABLES TO reader
|
||||
# GRANT SELECT privileges for new TABLES objects created by librarian as
|
||||
# default to the role reader.
|
||||
|
@ -390,7 +390,7 @@ EXAMPLES = r'''
|
|||
role: reader
|
||||
target_roles: librarian
|
||||
|
||||
# Available since version 2.10
|
||||
# Available since Ansible 2.10
|
||||
- name: Grant type privileges for pg_catalog.numeric type to alice
|
||||
postgresql_privs:
|
||||
type: type
|
||||
|
|
|
@ -231,7 +231,8 @@ def main():
|
|||
is_old_facts = module._name in ('vertica_facts', 'community.general.vertica_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'vertica_facts' module has been renamed to 'vertica_info', "
|
||||
"and the renamed one no longer returns ansible_facts", version='2.13')
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
if not pyodbc_found:
|
||||
module.fail_json(msg=missing_required_lib('pyodbc'), exception=PYODBC_IMP_ERR)
|
||||
|
|
|
@ -51,7 +51,7 @@ options:
|
|||
description:
|
||||
- If C(yes), which will replace the remote file when contents are different than the source.
|
||||
- If C(no), the file will only be extracted and copied if the destination does not already exist.
|
||||
- Alias C(thirsty) has been deprecated and will be removed in 2.13.
|
||||
- Alias C(thirsty) has been deprecated and will be removed in community.general 3.0.0.
|
||||
type: bool
|
||||
default: yes
|
||||
aliases: [ thirsty ]
|
||||
|
@ -112,7 +112,8 @@ def main():
|
|||
executable = module.params['executable']
|
||||
|
||||
if module.params.get('thirsty'):
|
||||
module.deprecate('The alias "thirsty" has been deprecated and will be removed, use "force" instead', version='2.13')
|
||||
module.deprecate('The alias "thirsty" has been deprecated and will be removed, use "force" instead',
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
||||
result = dict(
|
||||
changed=False,
|
||||
|
|
|
@ -824,7 +824,7 @@ def main():
|
|||
supports_check_mode=True,
|
||||
required_by=dict(
|
||||
add_children=['xpath'],
|
||||
# TODO: Reinstate this in Ansible v2.12 when we have deprecated the incorrect use below
|
||||
# TODO: Reinstate this in community.general 2.0.0 when we have deprecated the incorrect use below
|
||||
# attribute=['value'],
|
||||
content=['xpath'],
|
||||
set_children=['xpath'],
|
||||
|
@ -875,9 +875,10 @@ def main():
|
|||
module.warn('Using lxml version lower than 3.0.0 does not guarantee predictable element attribute order.')
|
||||
|
||||
# Report wrongly used attribute parameter when using content=attribute
|
||||
# TODO: Remove this in Ansible v2.12 (and reinstate strict parameter test above) and remove the integration test example
|
||||
# TODO: Remove this in community.general 2.0.0 (and reinstate strict parameter test above) and remove the integration test example
|
||||
if content == 'attribute' and attribute is not None:
|
||||
module.deprecate("Parameter 'attribute=%s' is ignored when using 'content=attribute' only 'xpath' is used. Please remove entry." % attribute, '2.12')
|
||||
module.deprecate("Parameter 'attribute=%s' is ignored when using 'content=attribute' only 'xpath' is used. Please remove entry." % attribute,
|
||||
version='2.0.0', collection_name='community.general') # was Ansible 2.12
|
||||
|
||||
# Check if the file exists
|
||||
if xml_string:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
./cloud/google/gcp_backend_service.py
|
|
@ -1 +0,0 @@
|
|||
./cloud/google/gcp_forwarding_rule.py
|
|
@ -1 +0,0 @@
|
|||
./cloud/google/gcp_healthcheck.py
|
|
@ -1 +0,0 @@
|
|||
./cloud/google/gcpubsub.py
|
1
plugins/modules/gcpubsub_facts.py
Symbolic link
1
plugins/modules/gcpubsub_facts.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
cloud/google/gcpubsub_facts.py
|
|
@ -1 +0,0 @@
|
|||
./cloud/google/gcpubsub_info.py
|
|
@ -380,7 +380,8 @@ def main():
|
|||
|
||||
if module._name in ('onepassword_facts', 'community.general.onepassword_facts'):
|
||||
module.deprecate("The 'onepassword_facts' module has been renamed to 'onepassword_info'. "
|
||||
"When called with the new name it no longer returns 'ansible_facts'", version='2.13')
|
||||
"When called with the new name it no longer returns 'ansible_facts'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
module.exit_json(changed=False, ansible_facts=results)
|
||||
else:
|
||||
module.exit_json(changed=False, **results)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue