1
0
Fork 0
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:
Felix Fontein 2020-06-16 13:15:19 +02:00 committed by GitHub
parent 5324b98e8f
commit b54ddaa28c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
152 changed files with 647 additions and 2628 deletions

View file

@ -60,673 +60,401 @@ plugin_routing:
modules: modules:
ali_instance_facts: ali_instance_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean: digital_ocean:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_account_facts: digital_ocean_account_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_certificate_facts: digital_ocean_certificate_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_domain_facts: digital_ocean_domain_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_firewall_facts: digital_ocean_firewall_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_floating_ip_facts: digital_ocean_floating_ip_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_image_facts: digital_ocean_image_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_load_balancer_facts: digital_ocean_load_balancer_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_region_facts: digital_ocean_region_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_size_facts: digital_ocean_size_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_snapshot_facts: digital_ocean_snapshot_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_sshkey_facts: digital_ocean_sshkey_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_tag_facts: digital_ocean_tag_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
digital_ocean_volume_facts: digital_ocean_volume_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
docker_image_facts: docker_image_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
docker_service: docker_service:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gcdns_record: gcdns_record:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gcdns_zone: gcdns_zone:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gce: gce:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details
gcp_backend_service:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_bigquery_dataset_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_bigquery_table_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_cloudbuild_trigger_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_address_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_backend_bucket_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_backend_service_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_disk_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_firewall_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_forwarding_rule_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_global_address_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_global_forwarding_rule_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_health_check_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_http_health_check_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_https_health_check_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_image_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_instance_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_instance_group_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_instance_group_manager_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_instance_template_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_interconnect_attachment_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_network_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_region_disk_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_route_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_router_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_ssl_certificate_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_ssl_policy_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_subnetwork_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_target_http_proxy_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_target_https_proxy_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_target_pool_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_target_ssl_proxy_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_target_tcp_proxy_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_target_vpn_gateway_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_url_map_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_compute_vpn_tunnel_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_container_cluster_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_container_node_pool_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_dns_managed_zone_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_dns_resource_record_set_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_forwarding_rule:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_healthcheck:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_iam_role_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_iam_service_account_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_pubsub_subscription_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_pubsub_topic_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_redis_instance_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_resourcemanager_project_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_sourcerepo_repository_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_spanner_database_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_spanner_instance_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_sql_database_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_sql_instance_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gcp_sql_user_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gcp_target_proxy: gcp_target_proxy:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details
gcp_tpu_node_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gcp_url_map: gcp_url_map:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gcpubsub_facts: gcpubsub_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
gcspanner: gcspanner:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
helm: helm:
deprecation: 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. warning_text: The helm module in community.general has been deprecated. Use community.kubernetes.helm instead.
memset_memstore_facts: memset_memstore_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
memset_server_facts: memset_server_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt: ovirt:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
online_server_facts: online_server_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
online_user_facts: online_user_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
one_image_facts: one_image_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details
os_flavor_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_image_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_keystone_domain_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_networks_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_port_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_project_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_server_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_subnets_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
os_user_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_affinity_label_facts: ovirt_affinity_label_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_api_facts: ovirt_api_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_cluster_facts: ovirt_cluster_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_datacenter_facts: ovirt_datacenter_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_disk_facts: ovirt_disk_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_event_facts: ovirt_event_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_external_provider_facts: ovirt_external_provider_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_group_facts: ovirt_group_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_host_facts: ovirt_host_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_host_storage_facts: ovirt_host_storage_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_network_facts: ovirt_network_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_nic_facts: ovirt_nic_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_permission_facts: ovirt_permission_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_quota_facts: ovirt_quota_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_scheduling_policy_facts: ovirt_scheduling_policy_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_snapshot_facts: ovirt_snapshot_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_storage_domain_facts: ovirt_storage_domain_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_storage_template_facts: ovirt_storage_template_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_storage_vm_facts: ovirt_storage_vm_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_tag_facts: ovirt_tag_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_template_facts: ovirt_template_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_user_facts: ovirt_user_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_vm_facts: ovirt_vm_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ovirt_vmpool_facts: ovirt_vmpool_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_image_facts: scaleway_image_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_ip_facts: scaleway_ip_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_organization_facts: scaleway_organization_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_security_group_facts: scaleway_security_group_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_server_facts: scaleway_server_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_snapshot_facts: scaleway_snapshot_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
scaleway_volume_facts: scaleway_volume_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
smartos_image_facts: smartos_image_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
xenserver_guest_facts: xenserver_guest_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
vertica_facts: vertica_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
onepassword_facts: onepassword_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
ldap_attr: ldap_attr:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details
osx_say:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
foreman: foreman:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
katello: katello:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
hpilo_facts: hpilo_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_datacenter_facts: oneview_datacenter_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_enclosure_facts: oneview_enclosure_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_ethernet_network_facts: oneview_ethernet_network_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_fc_network_facts: oneview_fc_network_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_fcoe_network_facts: oneview_fcoe_network_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_logical_interconnect_group_facts: oneview_logical_interconnect_group_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_network_set_facts: oneview_network_set_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
oneview_san_manager_facts: oneview_san_manager_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
idrac_redfish_facts: idrac_redfish_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
redfish_facts: redfish_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
github_hooks: github_hooks:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details
github_webhook_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gitlab_hooks:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details
gluster_heal_facts:
deprecation:
removal_date: TBD
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_aggregate: na_cdot_aggregate:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_license: na_cdot_license:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_lun: na_cdot_lun:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_qtree: na_cdot_qtree:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_svm: na_cdot_svm:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_user: na_cdot_user:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_user_role: na_cdot_user_role:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_cdot_volume: na_cdot_volume:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
na_ontap_gather_facts: na_ontap_gather_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
sf_account_manager: sf_account_manager:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
sf_check_connections: sf_check_connections:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
sf_snapshot_schedule_manager: sf_snapshot_schedule_manager:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
sf_volume_access_group_manager: sf_volume_access_group_manager:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
sf_volume_manager: sf_volume_manager:
deprecation: deprecation:
removal_date: TBD removal_version: 2.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
purefa_facts: purefa_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
purefb_facts: purefb_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
python_requirements_facts: python_requirements_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
jenkins_job_facts: jenkins_job_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details
nginx_status_facts: nginx_status_facts:
deprecation: deprecation:
removal_date: TBD removal_version: 3.0.0
warning_text: see plugin documentation for details warning_text: see plugin documentation for details

View file

@ -179,7 +179,8 @@ class CacheModule(BaseCacheModule):
self._prefix = self.get_option('_prefix') self._prefix = self.get_option('_prefix')
except KeyError: except KeyError:
display.deprecated('Rather than importing CacheModules directly, ' 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: if C.CACHE_PLUGIN_CONNECTION:
connection = C.CACHE_PLUGIN_CONNECTION.split(',') connection = C.CACHE_PLUGIN_CONNECTION.split(',')
self._timeout = C.CACHE_PLUGIN_TIMEOUT self._timeout = C.CACHE_PLUGIN_TIMEOUT

View file

@ -79,7 +79,8 @@ class CacheModule(BaseCacheModule):
self._prefix = self.get_option('_prefix') self._prefix = self.get_option('_prefix')
except KeyError: except KeyError:
display.deprecated('Rather than importing CacheModules directly, ' 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: if C.CACHE_PLUGIN_CONNECTION:
uri = C.CACHE_PLUGIN_CONNECTION uri = C.CACHE_PLUGIN_CONNECTION
self._timeout = float(C.CACHE_PLUGIN_TIMEOUT) self._timeout = float(C.CACHE_PLUGIN_TIMEOUT)

View file

@ -15,7 +15,7 @@ DOCUMENTATION = '''
- This callback suppresses any non Failed or Changed status. - This callback suppresses any non Failed or Changed status.
deprecated: deprecated:
why: The 'default' callback plugin now supports this functionality 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" alternative: "'default' callback plugin with 'display_skipped_hosts = no' and 'display_ok_hosts = no' options"
extends_documentation_fragment: extends_documentation_fragment:
- default_callback - default_callback
@ -32,7 +32,7 @@ DOCUMENTATION = '''
- name: DISPLAY_SKIPPED_HOSTS - name: DISPLAY_SKIPPED_HOSTS
deprecated: deprecated:
why: environment variables without "ANSIBLE_" prefix are 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 alternatives: the "ANSIBLE_DISPLAY_SKIPPED_HOSTS" environment variable
- name: ANSIBLE_DISPLAY_SKIPPED_HOSTS - name: ANSIBLE_DISPLAY_SKIPPED_HOSTS
ini: ini:

View file

@ -14,7 +14,7 @@ DOCUMENTATION = '''
- Use this plugin when you do not care about any output for tasks that were completely skipped - Use this plugin when you do not care about any output for tasks that were completely skipped
deprecated: deprecated:
why: The 'default' callback plugin now supports this functionality 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" alternative: "'default' callback plugin with 'display_skipped_hosts = no' option"
extends_documentation_fragment: extends_documentation_fragment:
- default_callback - default_callback

View file

@ -14,7 +14,7 @@ DOCUMENTATION = '''
short_description: Splits output, sending failed tasks to stderr short_description: Splits output, sending failed tasks to stderr
deprecated: deprecated:
why: The 'default' callback plugin now supports this functionality 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" alternative: "'default' callback plugin with 'display_failed_stderr = yes' option"
extends_documentation_fragment: extends_documentation_fragment:
- default_callback - default_callback

View file

@ -24,7 +24,7 @@ options:
- The name of the bucket. - The name of the bucket.
required: false required: false
extends_documentation_fragment: extends_documentation_fragment:
- community.general.gcp - community.general._gcp
''' '''

View file

@ -245,7 +245,7 @@ class RedfishUtils(object):
'msg': "System resource %s not found" % self.resource_id} 'msg': "System resource %s not found" % self.resource_id}
elif len(self.systems_uris) > 1: elif len(self.systems_uris) > 1:
self.module.deprecate(DEPRECATE_MSG % {'resource': 'System'}, 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} return {'ret': True}
def _find_updateservice_resource(self): def _find_updateservice_resource(self):
@ -296,7 +296,7 @@ class RedfishUtils(object):
'msg': "Chassis resource %s not found" % self.resource_id} 'msg': "Chassis resource %s not found" % self.resource_id}
elif len(self.chassis_uris) > 1: elif len(self.chassis_uris) > 1:
self.module.deprecate(DEPRECATE_MSG % {'resource': 'Chassis'}, 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} return {'ret': True}
def _find_managers_resource(self): def _find_managers_resource(self):
@ -326,7 +326,7 @@ class RedfishUtils(object):
'msg': "Manager resource %s not found" % self.resource_id} 'msg': "Manager resource %s not found" % self.resource_id}
elif len(self.manager_uris) > 1: elif len(self.manager_uris) > 1:
self.module.deprecate(DEPRECATE_MSG % {'resource': 'Manager'}, 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} return {'ret': True}
def _get_all_action_info_values(self, action): def _get_all_action_info_values(self, action):

View file

@ -384,7 +384,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('ali_instance_facts', 'community.general.ali_instance_facts'): 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: if HAS_FOOTMARK is False:
module.fail_json(msg=missing_required_lib('footmark'), exception=FOOTMARK_IMP_ERR) module.fail_json(msg=missing_required_lib('footmark'), exception=FOOTMARK_IMP_ERR)

View file

@ -29,7 +29,7 @@ options:
choices: ['present','absent'] choices: ['present','absent']
wait: wait:
description: 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 type: bool
requirements: requirements:
- python = 2.7 - python = 2.7
@ -183,7 +183,7 @@ class ClcAntiAffinityPolicy:
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
location=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']), state=dict(default='present', choices=['present', 'absent']),
) )
return argument_spec return argument_spec

View file

@ -93,7 +93,7 @@ options:
description: description:
- UUID of another server to create an anti-affinity group with. - UUID of another server to create an anti-affinity group with.
- Mutually exclusive with I(server_groups). - Mutually exclusive with I(server_groups).
- Deprecated, removed in version 2.11. - Deprecated, removed in community.general 2.0.0.
type: str type: str
server_groups: server_groups:
description: description:
@ -245,7 +245,7 @@ ssh_host_keys:
anti_affinity_with: anti_affinity_with:
description: description:
- List of servers in the same anti-affinity group - 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 returned: success when not state == absent
type: list type: list
sample: [] sample: []
@ -521,7 +521,7 @@ def main():
use_public_network=dict(type='bool', default=True), use_public_network=dict(type='bool', default=True),
use_private_network=dict(type='bool', default=False), use_private_network=dict(type='bool', default=False),
use_ipv6=dict(type='bool', default=True), 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'), server_groups=dict(type='list'),
user_data=dict(), user_data=dict(),
force=dict(type='bool', default=False), force=dict(type='bool', default=False),

View file

@ -13,7 +13,7 @@ DOCUMENTATION = '''
module: digital_ocean module: digital_ocean
short_description: Create/delete a droplet/SSH_key in DigitalOcean short_description: Create/delete a droplet/SSH_key in DigitalOcean
deprecated: deprecated:
removed_in: '2.12' removed_in: 2.0.0 # was Ansible 2.12
why: Updated module to remove external dependency with increased functionality. why: Updated module to remove external dependency with increased functionality.
alternative: Use M(digital_ocean_droplet) instead. alternative: Use M(digital_ocean_droplet) instead.
description: description:

View file

@ -69,7 +69,8 @@ def main():
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec() argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_account_facts', 'community.general.digital_ocean_account_facts'): 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: try:
core(module) core(module)
except Exception as e: except Exception as e:

View file

@ -100,7 +100,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_certificate_facts', 'community.general.digital_ocean_certificate_facts'): 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: try:
core(module) core(module)

View file

@ -125,7 +125,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_domain_facts', 'community.general.digital_ocean_domain_facts'): 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: try:
core(module) core(module)

View file

@ -118,7 +118,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_firewall_facts', 'community.general.digital_ocean_firewall_facts'): 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: try:
core(module) core(module)

View file

@ -106,7 +106,8 @@ def main():
argument_spec=DigitalOceanHelper.digital_ocean_argument_spec() argument_spec=DigitalOceanHelper.digital_ocean_argument_spec()
) )
if module._name in ('digital_ocean_floating_ip_facts', 'community.general.digital_ocean_floating_ip_facts'): 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: try:
core(module) core(module)

View file

@ -135,7 +135,8 @@ def main():
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_image_facts', 'community.general.digital_ocean_image_facts'): 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: try:
core(module) core(module)

View file

@ -102,7 +102,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_load_balancer_facts', 'community.general.digital_ocean_load_balancer_facts'): 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: try:
core(module) core(module)

View file

@ -102,7 +102,8 @@ def main():
argument_spec = DigitalOceanHelper.digital_ocean_argument_spec() argument_spec = DigitalOceanHelper.digital_ocean_argument_spec()
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_region_facts', 'community.general.digital_ocean_region_facts'): 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: try:
core(module) core(module)

View file

@ -100,7 +100,8 @@ def main():
argument_spec=argument_spec, argument_spec=argument_spec,
) )
if module._name in ('digital_ocean_size_facts', 'community.general.digital_ocean_size_facts'): 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: try:
core(module) core(module)

View file

@ -147,7 +147,8 @@ def main():
], ],
) )
if module._name in ('digital_ocean_snapshot_facts', 'community.general.digital_ocean_snapshot_facts'): 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: try:
core(module) core(module)

View file

@ -13,7 +13,7 @@ DOCUMENTATION = '''
--- ---
module: digital_ocean_sshkey_facts module: digital_ocean_sshkey_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(digital_ocean_sshkey_info) instead. alternative: Use M(digital_ocean_sshkey_info) instead.
short_description: DigitalOcean SSH keys facts short_description: DigitalOcean SSH keys facts
@ -91,7 +91,8 @@ def main():
supports_check_mode=False, 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) core(module)

View file

@ -102,7 +102,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_tag_facts', 'community.general.digital_ocean_tag_facts'): 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: try:
core(module) core(module)

View file

@ -127,7 +127,8 @@ def main():
) )
module = AnsibleModule(argument_spec=argument_spec) module = AnsibleModule(argument_spec=argument_spec)
if module._name in ('digital_ocean_volume_facts', 'community.general.digital_ocean_volume_facts'): 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: try:
core(module) core(module)

View file

@ -308,7 +308,7 @@ services:
- A dictionary mapping the service's name to a dictionary of containers. - 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 - 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 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 returned: success
type: complex type: complex
contains: contains:
@ -1136,7 +1136,8 @@ def main():
min_docker_api_version='1.20', min_docker_api_version='1.20',
) )
if client.module._name in ('docker_service', 'community.general.docker_service'): 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: try:
result = ContainerManager(client).exec_module() result = ContainerManager(client).exec_module()

View file

@ -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), 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 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 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: options:
auto_remove: auto_remove:
@ -89,7 +89,7 @@ options:
containers which use different values for these options. containers which use different values for these options.
- The default value is C(compatibility), which will ensure that the default values - 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. 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 deprecation warnings, please set I(container_default_behavior) to an explicit
value. value.
- This affects the I(auto_remove), I(detach), I(init), I(interactive), I(memory), - This affects the I(auto_remove), I(detach), I(init), I(interactive), I(memory),
@ -508,7 +508,7 @@ options:
network_mode: network_mode:
description: 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). - 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 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 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." 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 - 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 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)). 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 type: list
elements: dict elements: dict
suboptions: suboptions:
@ -567,11 +567,11 @@ options:
- "*Note* that docker CLI also sets I(network_mode) to the name of the first network - "*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 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 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) 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 not specified, I(networks) has at least one entry and I(networks_cli_compatible)
is C(true)." 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 type: bool
oom_killer: oom_killer:
description: description:
@ -618,7 +618,7 @@ options:
container port, 9000 is a host port, and 0.0.0.0 is a host interface." 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 - Port ranges can be used for source and destination ports. If two ranges with
different lengths are specified, the shorter range will be used. 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 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. same behavior as for C(docker) command line utility.
- "Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are *not* allowed. This - "Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are *not* allowed. This
@ -750,7 +750,7 @@ options:
trust_image_content: trust_image_content:
description: description:
- If C(yes), skip image verification. - 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 type: bool
default: no default: no
tmpfs: tmpfs:
@ -1054,7 +1054,8 @@ container:
description: description:
- Facts representing the current state of the container. Matches the docker inspection output. - 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 - 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 - 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. conflicts with the connection plugin.
- Empty if I(state) is C(absent) - Empty if I(state) is C(absent)
@ -3262,8 +3263,8 @@ class AnsibleDockerClientContainer(AnsibleDockerClient):
self.module.params['container_default_behavior'] = 'compatibility' self.module.params['container_default_behavior'] = 'compatibility'
self.module.deprecate( self.module.deprecate(
'The container_default_behavior option will change its default value from "compatibility" to ' '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', '"no_defaults" in community.general 3.0.0. To remove this warning, please specify an explicit value for it now',
version='2.14' version='3.0.0', collection_name='community.general' # was Ansible 2.14
) )
if self.module.params['container_default_behavior'] == 'compatibility': if self.module.params['container_default_behavior'] == 'compatibility':
old_default_values = dict( old_default_values = dict(
@ -3400,7 +3401,8 @@ def main():
stop_timeout=dict(type='int'), stop_timeout=dict(type='int'),
sysctls=dict(type='dict'), sysctls=dict(type='dict'),
tmpfs=dict(type='list', elements='str'), 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'), tty=dict(type='bool'),
ulimits=dict(type='list', elements='str'), ulimits=dict(type='list', elements='str'),
user=dict(type='str'), user=dict(type='str'),
@ -3427,10 +3429,10 @@ def main():
'Please note that docker_container handles networks slightly different than docker CLI. ' '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. ' '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.) ' '(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 ' 'the new `networks_cli_compatible` option to `yes`, and remove this warning by setting '
'it to `no`', '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: 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( client.module.deprecate(
@ -3442,7 +3444,7 @@ def main():
'Please make sure that the value you set to `network_mode` equals the inspection result ' '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 ' '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>"', '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: try:

View file

@ -18,7 +18,7 @@ description:
- Build, load or pull an image, making the image available for creating containers. Also supports tagging an - 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. 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), - 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: options:
source: source:
@ -31,9 +31,9 @@ options:
- "Use C(pull) to pull the image from a registry." - "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 - "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." 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 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." and this option will be made mandatory."
type: str type: str
choices: choices:
@ -70,7 +70,7 @@ options:
pull: pull:
description: description:
- When building an image downloads any updates to the FROM image in Dockerfile. - 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 type: bool
rm: rm:
description: description:
@ -137,15 +137,15 @@ options:
description: description:
- Use with state C(present) to load an image from a .tar file. - 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 - 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). 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 type: path
dockerfile: dockerfile:
description: description:
- Use with state C(present) and source C(build) to provide an alternate name for the Dockerfile to use when building an image. - 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)). - 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 type: str
force: force:
description: description:
@ -154,7 +154,7 @@ options:
to force tagging an image. to force tagging an image.
- Please stop using this option, and use the more specialized force options - Please stop using this option, and use the more specialized force options
I(force_source), I(force_absent) and I(force_tag) instead. 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 type: bool
force_source: force_source:
description: description:
@ -176,7 +176,7 @@ options:
description: description:
- Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of - Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of
seconds. 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 type: int
name: name:
description: 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 - Use with state 'present' to build an image. Will be the path to a directory containing the context and
Dockerfile for building an image. Dockerfile for building an image.
- Set I(source) to C(build) if you want to build the image. The option will - 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). 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 type: path
aliases: aliases:
- build_path - build_path
pull: pull:
description: description:
- When building an image downloads any updates to the FROM image in Dockerfile. - 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. - 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 Ansible 2.12. - The default is currently C(yes). This will change to C(no) in community.general 2.0.0.
type: bool type: bool
push: push:
description: description:
@ -210,13 +210,13 @@ options:
rm: rm:
description: description:
- Remove intermediate containers after build. - 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 type: bool
default: yes default: yes
nocache: nocache:
description: description:
- Do not use cache when building an image. - 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 type: bool
default: no default: no
repository: 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 - 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. 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 - 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) 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 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. 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)." same as C(present)."
type: str type: str
default: present default: present
@ -256,12 +256,12 @@ options:
- Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive. - 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. - Docker expects the value to be a string. For convenience any non-string values will be converted to strings.
- Requires Docker API >= 1.21. - 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 type: dict
container_limits: container_limits:
description: description:
- A dictionary of limits applied to each container created by the build process. - 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 type: dict
suboptions: suboptions:
memory: memory:
@ -287,7 +287,7 @@ options:
the server's certificate is valid for the server." 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 - "*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)." 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 type: str
choices: choices:
- 'no' - 'no'
@ -806,30 +806,31 @@ def main():
memswap=dict(type='int'), memswap=dict(type='int'),
cpushares=dict(type='int'), cpushares=dict(type='int'),
cpusetcpus=dict(type='str'), cpusetcpus=dict(type='str'),
), 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.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.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_source=dict(type='bool', default=False),
force_absent=dict(type='bool', default=False), force_absent=dict(type='bool', default=False),
force_tag=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'), load_path=dict(type='path'),
name=dict(type='str', required=True), name=dict(type='str', required=True),
nocache=dict(type='bool', default=False, 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.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.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), push=dict(type='bool', default=False),
repository=dict(type='str'), 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']), state=dict(type='str', default='present', choices=['absent', 'present', 'build']),
tag=dict(type='str', default='latest'), tag=dict(type='str', default='latest'),
use_tls=dict(type='str', choices=['no', 'encrypt', 'verify'], removed_in_version='2.11'), use_tls=dict(type='str', choices=['no', 'encrypt', 'verify'], removed_in_version='2.0.0',
buildargs=dict(type='dict', removed_in_version='2.12'), 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 = [ required_if = [
# ('state', 'present', ['source']), -- enable in Ansible 2.12. # ('state', 'present', ['source']), -- enable in community.general 2.0.0
# ('source', 'build', ['build']), -- enable in Ansible 2.12. # ('source', 'build', ['build']), -- enable in community.general 2.0.0
('source', 'load', ['load_path']), ('source', 'load', ['load_path']),
] ]
@ -865,14 +866,14 @@ def main():
) )
if client.module.params['state'] == 'build': if client.module.params['state'] == 'build':
client.module.warn('The "build" state has been deprecated for a long time ' client.module.deprecate('The "build" state has been deprecated for a long time. '
'and will be removed in Ansible 2.11. Please use ' 'Please use "present", which has the same meaning as "build".',
'"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' client.module.params['state'] = 'present'
if client.module.params['use_tls']: if client.module.params['use_tls']:
client.module.warn('The "use_tls" option has been deprecated for a long time ' client.module.deprecate('The "use_tls" option has been deprecated for a long time. '
'and will be removed in Ansible 2.11. Please use the' 'Please use the "tls" and "validate_certs" options instead.',
'"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): 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'])) 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: 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.fail('Cannot specify both %s and build.%s!' % (option, build_option))
client.module.params['build'][build_option] = client.module.params[option] client.module.params['build'][build_option] = client.module.params[option]
client.module.warn('Please specify build.%s instead of %s. The %s option ' client.module.deprecate('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)) '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 client.module.params['source'] == 'build':
if (not client.module.params['build'] or not client.module.params['build'].get('path')): 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.') client.fail('If "source" is set to "build", the "build.path" option must be specified.')
if client.module.params['build'].get('pull') is None: 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. " client.module.deprecate("The default for build.pull is currently 'yes', but will be changed to "
"Please set build.pull explicitly to the value you need.") "'no' in community.general 2.0.0. Please set build.pull explicitly to the value you need",
client.module.params['build']['pull'] = True # TODO: change to False in Ansible 2.12 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: 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'): if (client.module.params['build'] or dict()).get('path'):
client.module.params['source'] = 'build' client.module.params['source'] = 'build'
elif client.module.params['load_path']: elif client.module.params['load_path']:
client.module.params['source'] = 'load' client.module.params['source'] = 'load'
else: else:
client.module.params['source'] = 'pull' 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 ' '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']: if client.module.params['force']:
client.module.params['force_source'] = True client.module.params['force_source'] = True
client.module.params['force_absent'] = True client.module.params['force_absent'] = True
client.module.params['force_tag'] = 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 ' '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: try:
results = dict( results = dict(

View file

@ -249,7 +249,8 @@ def main():
min_docker_api_version='1.20', min_docker_api_version='1.20',
) )
if client.module._name in ('docker_image_facts', 'community.general.docker_image_facts'): 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: try:
results = dict( results = dict(

View file

@ -43,7 +43,7 @@ options:
email: email:
description: description:
- Does nothing, do not use. - Does nothing, do not use.
- Will be removed in Ansible 2.14. - Will be removed in community.general 3.0.0.
type: str type: str
reauthorize: reauthorize:
description: description:
@ -445,7 +445,7 @@ def main():
registry_url=dict(type='str', default=DEFAULT_DOCKER_REGISTRY, aliases=['registry', 'url']), registry_url=dict(type='str', default=DEFAULT_DOCKER_REGISTRY, aliases=['registry', 'url']),
username=dict(type='str'), username=dict(type='str'),
password=dict(type='str', no_log=True), 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']), reauthorize=dict(type='bool', default=False, aliases=['reauth']),
state=dict(type='str', default='present', choices=['present', 'absent']), state=dict(type='str', default='present', choices=['present', 'absent']),
config_path=dict(type='path', default='~/.docker/config.json', aliases=['dockercfg_path']), config_path=dict(type='path', default='~/.docker/config.json', aliases=['dockercfg_path']),

View file

@ -82,7 +82,7 @@ options:
ipam_options: ipam_options:
description: description:
- Dictionary of IPAM options. - 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 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) the IPAM config not the newly introduced IPAM options. For the IPAM options, see the I(ipam_driver_options)
parameter. parameter.
@ -271,7 +271,7 @@ network:
description: description:
- Network inspection results for the affected network. - 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 - 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 returned: success
type: dict type: dict
sample: {} sample: {}
@ -668,7 +668,7 @@ def main():
iprange=dict(type='str'), iprange=dict(type='str'),
gateway=dict(type='str'), gateway=dict(type='str'),
aux_addresses=dict(type='dict'), 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( ipam_config=dict(type='list', elements='dict', options=dict(
subnet=dict(type='str'), subnet=dict(type='str'),
iprange=dict(type='str'), iprange=dict(type='str'),

View file

@ -78,7 +78,7 @@ requirements:
- pyyaml - pyyaml
notes: 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 = ''' RETURN = '''

View file

@ -444,7 +444,7 @@ class SwarmManager(DockerBaseClass):
if self.state == 'inspect': if self.state == 'inspect':
self.client.module.deprecate( self.client.module.deprecate(
"The 'inspect' state is deprecated, please use 'docker_swarm_info' to inspect swarm cluster", "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)() choice_map.get(self.state)()

View file

@ -66,7 +66,7 @@ options:
description: description:
- List of the service constraints. - List of the service constraints.
- Corresponds to the C(--constraint) option of C(docker service create). - 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 type: list
elements: str elements: str
container_labels: container_labels:
@ -219,7 +219,7 @@ options:
description: description:
- Service CPU limit. C(0) equals no limit. - Service CPU limit. C(0) equals no limit.
- Corresponds to the C(--limit-cpu) option of C(docker service create). - 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 type: float
limit_memory: limit_memory:
description: description:
@ -229,7 +229,7 @@ options:
- C(0) equals no limit. - C(0) equals no limit.
- Omitting the unit defaults to bytes. - Omitting the unit defaults to bytes.
- Corresponds to the C(--limit-memory) option of C(docker service create). - 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 type: str
logging: logging:
description: description:
@ -250,13 +250,13 @@ options:
description: description:
- Configure the logging driver for a service. - Configure the logging driver for a service.
- Corresponds to the C(--log-driver) option of C(docker service create). - 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 type: str
log_driver_options: log_driver_options:
description: description:
- Options for service logging driver. - Options for service logging driver.
- Corresponds to the C(--log-opt) option of C(docker service create). - 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 type: dict
mode: mode:
description: description:
@ -451,7 +451,7 @@ options:
description: description:
- Service CPU reservation. C(0) equals no reservation. - Service CPU reservation. C(0) equals no reservation.
- Corresponds to the C(--reserve-cpu) option of C(docker service create). - 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 type: float
reserve_memory: reserve_memory:
description: description:
@ -461,7 +461,7 @@ options:
- C(0) equals no reservation. - C(0) equals no reservation.
- Omitting the unit defaults to bytes. - Omitting the unit defaults to bytes.
- Corresponds to the C(--reserve-memory) option of C(docker service create). - 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 type: str
resolve_image: resolve_image:
description: description:
@ -506,7 +506,7 @@ options:
description: description:
- Restart condition of the service. - Restart condition of the service.
- Corresponds to the C(--restart-condition) option of C(docker service create). - 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 type: str
choices: choices:
- none - none
@ -516,7 +516,7 @@ options:
description: description:
- Maximum number of service restarts. - Maximum number of service restarts.
- Corresponds to the C(--restart-condition) option of C(docker service create). - 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 type: int
restart_policy_delay: restart_policy_delay:
description: description:
@ -524,7 +524,7 @@ options:
- "Accepts a duration as an integer in nanoseconds or as a string in a format that look like: - "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)." 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). - 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 type: raw
restart_policy_window: restart_policy_window:
description: description:
@ -532,7 +532,7 @@ options:
- "Accepts a duration as an integer in nanoseconds or as a string in a format that look like: - "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)." 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). - 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 type: raw
rollback_config: rollback_config:
description: 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)." 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). - 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). - 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 type: raw
update_parallelism: update_parallelism:
description: description:
- Rolling update parallelism. - Rolling update parallelism.
- Corresponds to the C(--update-parallelism) option of C(docker service create). - 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). - 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 type: int
update_failure_action: update_failure_action:
description: description:
- Action to take in case of container failure. - Action to take in case of container failure.
- Corresponds to the C(--update-failure-action) option of C(docker service create). - Corresponds to the C(--update-failure-action) option of C(docker service create).
- Usage of I(rollback) requires API version >= 1.29. - 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 type: str
choices: choices:
- continue - 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)." 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). - Corresponds to the C(--update-monitor) option of C(docker service create).
- Requires API version >= 1.25. - 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 type: raw
update_max_failure_ratio: update_max_failure_ratio:
description: description:
- Fraction of tasks that may fail during an update before the failure action is invoked. - 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). - Corresponds to the C(--update-max-failure-ratio) option of C(docker service create).
- Requires API version >= 1.25. - 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 type: float
update_order: update_order:
description: description:
- Specifies the order of operations when rolling out an updated task. - Specifies the order of operations when rolling out an updated task.
- Corresponds to the C(--update-order) option of C(docker service create). - Corresponds to the C(--update-order) option of C(docker service create).
- Requires API version >= 1.29. - 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 type: str
choices: choices:
- stop-first - stop-first
@ -2748,8 +2748,10 @@ def main():
driver=dict(type='str'), driver=dict(type='str'),
options=dict(type='dict'), options=dict(type='dict'),
)), )),
log_driver=dict(type='str', removed_in_version='2.12'), log_driver=dict(type='str', removed_in_version='2.0.0',
log_driver_options=dict(type='dict', removed_in_version='2.12'), 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( publish=dict(type='list', elements='dict', options=dict(
published_port=dict(type='int', required=True), published_port=dict(type='int', required=True),
target_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'), constraints=dict(type='list', elements='str'),
preferences=dict(type='list', elements='dict'), 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'), tty=dict(type='bool'),
dns=dict(type='list', elements='str'), dns=dict(type='list', elements='str'),
dns_search=dict(type='list', elements='str'), dns_search=dict(type='list', elements='str'),
@ -2789,15 +2792,19 @@ def main():
cpus=dict(type='float'), cpus=dict(type='float'),
memory=dict(type='str'), memory=dict(type='str'),
)), )),
limit_cpu=dict(type='float', removed_in_version='2.12'), limit_cpu=dict(type='float', removed_in_version='2.0.0',
limit_memory=dict(type='str', removed_in_version='2.12'), 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'), read_only=dict(type='bool'),
reservations=dict(type='dict', options=dict( reservations=dict(type='dict', options=dict(
cpus=dict(type='float'), cpus=dict(type='float'),
memory=dict(type='str'), memory=dict(type='str'),
)), )),
reserve_cpu=dict(type='float', removed_in_version='2.12'), reserve_cpu=dict(type='float', removed_in_version='2.0.0',
reserve_memory=dict(type='str', removed_in_version='2.12'), 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), resolve_image=dict(type='bool', default=False),
restart_config=dict(type='dict', options=dict( restart_config=dict(type='dict', options=dict(
condition=dict(type='str', choices=['none', 'on-failure', 'any']), condition=dict(type='str', choices=['none', 'on-failure', 'any']),
@ -2808,11 +2815,15 @@ def main():
restart_policy=dict( restart_policy=dict(
type='str', type='str',
choices=['none', 'on-failure', 'any'], 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_delay=dict(type='raw', removed_in_version='2.0.0',
restart_policy_attempts=dict(type='int', removed_in_version='2.12'), removed_from_collection='community.general'), # was Ansible 2.12
restart_policy_window=dict(type='raw', removed_in_version='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( rollback_config=dict(type='dict', options=dict(
parallelism=dict(type='int'), parallelism=dict(type='int'),
delay=dict(type='str'), delay=dict(type='str'),
@ -2835,19 +2846,25 @@ def main():
max_failure_ratio=dict(type='float'), max_failure_ratio=dict(type='float'),
order=dict(type='str'), order=dict(type='str'),
)), )),
update_delay=dict(type='raw', removed_in_version='2.12'), update_delay=dict(type='raw', removed_in_version='2.0.0',
update_parallelism=dict(type='int', removed_in_version='2.12'), 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( update_failure_action=dict(
type='str', type='str',
choices=['continue', 'pause', 'rollback'], 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_monitor=dict(type='raw', removed_in_version='2.0.0',
update_max_failure_ratio=dict(type='float', removed_in_version='2.12'), 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( update_order=dict(
type='str', type='str',
choices=['stop-first', 'start-first'], 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'), user=dict(type='str'),
working_dir=dict(type='str'), working_dir=dict(type='str'),

View file

@ -45,7 +45,7 @@ options:
- With state C(present) causes the volume to be deleted and recreated if the volume already - 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 exist and the driver, driver options or labels differ. This will cause any data in the existing
volume to be lost. 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). for the same behavior of setting I(force) to C(yes).
type: bool type: bool
default: no default: no
@ -113,7 +113,7 @@ volume:
description: description:
- Volume inspection results for the affected volume. - 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 - 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 returned: success
type: dict type: dict
sample: {} sample: {}
@ -302,7 +302,7 @@ def main():
driver=dict(type='str', default='local'), driver=dict(type='str', default='local'),
driver_options=dict(type='dict', default={}), driver_options=dict(type='dict', default={}),
labels=dict(type='dict'), 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']), recreate=dict(type='str', default='never', choices=['always', 'never', 'options-changed']),
debug=dict(type='bool', default=False) debug=dict(type='bool', default=False)
) )

View file

@ -23,7 +23,7 @@ requirements:
- "python >= 2.6" - "python >= 2.6"
- "apache-libcloud >= 0.19.0" - "apache-libcloud >= 0.19.0"
deprecated: deprecated:
removed_in: "2.12" removed_in: 2.0.0 # was Ansible 2.12
why: Updated modules released with increased functionality why: Updated modules released with increased functionality
alternative: Use M(gcp_dns_resource_record_set) instead. alternative: Use M(gcp_dns_resource_record_set) instead.
options: options:

View file

@ -22,7 +22,7 @@ author: "William Albert (@walbert947)"
requirements: requirements:
- "apache-libcloud >= 0.19.0" - "apache-libcloud >= 0.19.0"
deprecated: deprecated:
removed_in: "2.12" removed_in: 2.0.0 # was Ansible 2.12
why: Updated modules released with increased functionality why: Updated modules released with increased functionality
alternative: Use M(gcp_dns_managed_zone) instead. alternative: Use M(gcp_dns_managed_zone) instead.
options: options:

View file

@ -16,7 +16,7 @@ description:
Full install/configuration instructions for the gce* modules can Full install/configuration instructions for the gce* modules can
be found in the comments of ansible/test/gce_tests.py. be found in the comments of ansible/test/gce_tests.py.
deprecated: deprecated:
removed_in: "2.12" removed_in: 2.0.0 # was Ansible 2.12
why: Updated modules released with increased functionality why: Updated modules released with increased functionality
alternative: Use M(gcp_compute_instance) instead. alternative: Use M(gcp_compute_instance) instead.
options: options:

View file

@ -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()

View file

@ -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()

View file

@ -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()

View file

@ -21,7 +21,7 @@ requirements:
- "google-auth >= 0.9.0" - "google-auth >= 0.9.0"
- "google-auth-httplib2 >= 0.0.2" - "google-auth-httplib2 >= 0.0.2"
deprecated: deprecated:
removed_in: "2.12" removed_in: 2.0.0 # was Ansible 2.12
why: Updated modules released with increased functionality why: Updated modules released with increased functionality
alternative: Use M(gcp_compute_target_http_proxy) instead. alternative: Use M(gcp_compute_target_http_proxy) instead.
notes: notes:

View file

@ -26,7 +26,7 @@ notes:
author: author:
- "Tom Melendez (@supertom) <tom@supertom.com>" - "Tom Melendez (@supertom) <tom@supertom.com>"
deprecated: deprecated:
removed_in: "2.12" removed_in: 2.0.0 # was Ansible 2.12
why: Updated modules released with increased functionality why: Updated modules released with increased functionality
alternative: Use M(gcp_compute_url_map) instead. alternative: Use M(gcp_compute_url_map) instead.
options: options:

View file

@ -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()

View file

@ -1 +0,0 @@
gcpubsub_info.py

View 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()

View file

@ -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()

View file

@ -21,7 +21,7 @@ requirements:
notes: notes:
- Changing the configuration on an existing instance is not supported. - Changing the configuration on an existing instance is not supported.
deprecated: deprecated:
removed_in: "2.12" removed_in: 2.0.0 # was Ansible 2.12
why: Updated modules released with increased functionality why: Updated modules released with increased functionality
alternative: Use M(gcp_spanner_database) and/or M(gcp_spanner_instance) instead. alternative: Use M(gcp_spanner_database) and/or M(gcp_spanner_instance) instead.
author: author:

View file

@ -150,7 +150,8 @@ def main():
supports_check_mode=False supports_check_mode=False
) )
if module._name in ('memset_memstore_facts', 'community.general.memset_memstore_facts'): 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. # populate the dict with the user-provided vars.
args = dict() args = dict()

View file

@ -275,7 +275,8 @@ def main():
supports_check_mode=False supports_check_mode=False
) )
if module._name in ('memset_server_facts', 'community.general.memset_server_facts'): 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. # populate the dict with the user-provided vars.
args = dict() args = dict()

View file

@ -10,9 +10,9 @@ __metaclass__ = type
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
deprecated: 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. 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 module: helm
short_description: Manages Kubernetes packages with the Helm package manager short_description: Manages Kubernetes packages with the Helm package manager
author: "Flavio Percoco (@flaper87)" author: "Flavio Percoco (@flaper87)"

View file

@ -13,7 +13,7 @@ author:
- Vincent Van der Kussen (@vincentvdk) - Vincent Van der Kussen (@vincentvdk)
short_description: oVirt/RHEV platform management short_description: oVirt/RHEV platform management
deprecated: deprecated:
removed_in: "2.14" removed_in: 3.0.0 # was Ansible 2.14
why: This module is for deprecated version of ovirt. why: This module is for deprecated version of ovirt.
alternative: Use C(ovirt_vm) from the C(ovirt.ovirt) collection instead alternative: Use C(ovirt_vm) from the C(ovirt.ovirt) collection instead
description: description:

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: online_server_facts module: online_server_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(online_server_info) instead. alternative: Use M(online_server_info) instead.
short_description: Gather facts about Online servers. short_description: Gather facts about Online servers.

View file

@ -10,7 +10,7 @@ DOCUMENTATION = r'''
--- ---
module: online_user_facts module: online_user_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(online_user_info) instead. alternative: Use M(online_user_info) instead.
short_description: Gather facts about Online user. short_description: Gather facts about Online user.

View file

@ -256,7 +256,8 @@ def main():
mutually_exclusive=[['ids', 'name']], mutually_exclusive=[['ids', 'name']],
supports_check_mode=True) supports_check_mode=True)
if module._name in ('one_image_facts', 'community.general.one_image_facts'): 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: if not HAS_PYONE:
module.fail_json(msg='This module requires pyone to work!') module.fail_json(msg='This module requires pyone to work!')

View file

@ -28,7 +28,7 @@ module: ovirt_affinity_label_facts
short_description: Retrieve information about one or more oVirt/RHV affinity labels short_description: Retrieve information about one or more oVirt/RHV affinity labels
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_affinity_label_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -134,7 +134,8 @@ def main():
is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts') is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', " 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) check_sdk(module)

View file

@ -13,7 +13,7 @@ module: ovirt_api_facts
short_description: Retrieve information about the oVirt/RHV API short_description: Retrieve information about the oVirt/RHV API
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_api_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -70,7 +70,8 @@ def main():
is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts') is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', " 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) check_sdk(module)
try: try:

View file

@ -28,7 +28,7 @@ module: ovirt_cluster_facts
short_description: Retrieve information about one or more oVirt/RHV clusters short_description: Retrieve information about one or more oVirt/RHV clusters
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_cluster_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -93,7 +93,8 @@ def main():
is_old_facts = module._name in ('ovirt_cluster_facts', 'community.general.ovirt_cluster_facts') is_old_facts = module._name in ('ovirt_cluster_facts', 'community.general.ovirt_cluster_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_cluster_facts' module has been renamed to 'ovirt_cluster_info', " 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) check_sdk(module)

View file

@ -13,7 +13,7 @@ module: ovirt_datacenter_facts
short_description: Retrieve information about one or more oVirt/RHV datacenters short_description: Retrieve information about one or more oVirt/RHV datacenters
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_datacenter_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -76,7 +76,8 @@ def main():
is_old_facts = module._name in ('ovirt_datacenter_facts', 'community.general.ovirt_datacenter_facts') is_old_facts = module._name in ('ovirt_datacenter_facts', 'community.general.ovirt_datacenter_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_datacenter_facts' module has been renamed to 'ovirt_datacenter_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_disk_facts
short_description: Retrieve information about one or more oVirt/RHV disks short_description: Retrieve information about one or more oVirt/RHV disks
author: "Katerina Koukiou (@KKoukiou)" author: "Katerina Koukiou (@KKoukiou)"
deprecated: 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. 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 alternative: Use C(ovirt_disk_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -92,7 +92,8 @@ def main():
is_old_facts = module._name in ('ovirt_disk_facts', 'community.general.ovirt_disk_facts') is_old_facts = module._name in ('ovirt_disk_facts', 'community.general.ovirt_disk_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_disk_facts' module has been renamed to 'ovirt_disk_info', " 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) check_sdk(module)
try: try:

View file

@ -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 short_description: This module can be used to retrieve information about one or more oVirt/RHV events
author: "Chris Keller (@nasx)" author: "Chris Keller (@nasx)"
deprecated: 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. 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 alternative: Use C(ovirt_event_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -129,7 +129,8 @@ def main():
is_old_facts = module._name in ('ovirt_event_facts', 'community.general.ovirt_event_facts') is_old_facts = module._name in ('ovirt_event_facts', 'community.general.ovirt_event_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_event_facts' module has been renamed to 'ovirt_event_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_external_provider_facts
short_description: Retrieve information about one or more oVirt/RHV external providers short_description: Retrieve information about one or more oVirt/RHV external providers
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_external_provider_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -124,7 +124,8 @@ def main():
is_old_facts = module._name in ('ovirt_external_provider_facts', 'community.general.ovirt_external_provider_facts') is_old_facts = module._name in ('ovirt_external_provider_facts', 'community.general.ovirt_external_provider_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_external_provider_facts' module has been renamed to 'ovirt_external_provider_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_group_facts
short_description: Retrieve information about one or more oVirt/RHV groups short_description: Retrieve information about one or more oVirt/RHV groups
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_group_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -91,7 +91,8 @@ def main():
is_old_facts = module._name in ('ovirt_group_facts', 'community.general.ovirt_group_facts') is_old_facts = module._name in ('ovirt_group_facts', 'community.general.ovirt_group_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_group_facts' module has been renamed to 'ovirt_group_info', " 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) check_sdk(module)

View file

@ -13,7 +13,7 @@ module: ovirt_host_facts
short_description: Retrieve information about one or more oVirt/RHV hosts short_description: Retrieve information about one or more oVirt/RHV hosts
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_host_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -111,7 +111,8 @@ def main():
is_old_facts = module._name in ('ovirt_host_facts', 'community.general.ovirt_host_facts') is_old_facts = module._name in ('ovirt_host_facts', 'community.general.ovirt_host_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', " 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) check_sdk(module)

View file

@ -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) short_description: Retrieve information about one or more oVirt/RHV HostStorages (applicable only for block storage)
author: "Daniel Erez (@derez)" author: "Daniel Erez (@derez)"
deprecated: 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. 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 alternative: Use C(ovirt_host_storage_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -133,7 +133,8 @@ def main():
is_old_facts = module._name in ('ovirt_host_storage_facts', 'community.general.ovirt_host_storage_facts') is_old_facts = module._name in ('ovirt_host_storage_facts', 'community.general.ovirt_host_storage_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_host_storage_facts' module has been renamed to 'ovirt_host_storage_info', " 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) check_sdk(module)
try: try:

View file

@ -28,7 +28,7 @@ module: ovirt_network_facts
short_description: Retrieve information about one or more oVirt/RHV networks short_description: Retrieve information about one or more oVirt/RHV networks
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_network_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -93,7 +93,8 @@ def main():
is_old_facts = module._name in ('ovirt_network_facts', 'community.general.ovirt_network_facts') is_old_facts = module._name in ('ovirt_network_facts', 'community.general.ovirt_network_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_network_facts' module has been renamed to 'ovirt_network_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_nic_facts
short_description: Retrieve information about one or more oVirt/RHV virtual machine network interfaces short_description: Retrieve information about one or more oVirt/RHV virtual machine network interfaces
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_nic_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -98,7 +98,8 @@ def main():
is_old_facts = module._name in ('ovirt_nic_facts', 'community.general.ovirt_nic_facts') is_old_facts = module._name in ('ovirt_nic_facts', 'community.general.ovirt_nic_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_nic_facts' module has been renamed to 'ovirt_nic_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_permission_facts
short_description: Retrieve information about one or more oVirt/RHV permissions short_description: Retrieve information about one or more oVirt/RHV permissions
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_permission_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -135,7 +135,8 @@ def main():
is_old_facts = module._name in ('ovirt_permission_facts', 'community.general.ovirt_permission_facts') is_old_facts = module._name in ('ovirt_permission_facts', 'community.general.ovirt_permission_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_permission_facts' module has been renamed to 'ovirt_permission_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_quota_facts
short_description: Retrieve information about one or more oVirt/RHV quotas short_description: Retrieve information about one or more oVirt/RHV quotas
author: "Maor Lipchuk (@machacekondra)" author: "Maor Lipchuk (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_quota_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -98,7 +98,8 @@ def main():
is_old_facts = module._name in ('ovirt_quota_facts', 'community.general.ovirt_quota_facts') is_old_facts = module._name in ('ovirt_quota_facts', 'community.general.ovirt_quota_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_quota_facts' module has been renamed to 'ovirt_quota_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_scheduling_policy_facts
short_description: Retrieve information about one or more oVirt scheduling policies short_description: Retrieve information about one or more oVirt scheduling policies
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_scheduling_policy_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -98,7 +98,8 @@ def main():
is_old_facts = module._name in ('ovirt_scheduling_policy_facts', 'community.general.ovirt_scheduling_policy_facts') is_old_facts = module._name in ('ovirt_scheduling_policy_facts', 'community.general.ovirt_scheduling_policy_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_scheduling_policy_facts' module has been renamed to 'ovirt_scheduling_policy_info', " 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) check_sdk(module)

View file

@ -13,7 +13,7 @@ module: ovirt_snapshot_facts
short_description: Retrieve information about one or more oVirt/RHV virtual machine snapshots short_description: Retrieve information about one or more oVirt/RHV virtual machine snapshots
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_snapshot_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -88,7 +88,8 @@ def main():
is_old_facts = module._name in ('ovirt_snapshot_facts', 'community.general.ovirt_snapshot_facts') is_old_facts = module._name in ('ovirt_snapshot_facts', 'community.general.ovirt_snapshot_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_snapshot_facts' module has been renamed to 'ovirt_snapshot_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_storage_domain_facts
short_description: Retrieve information about one or more oVirt/RHV storage domains short_description: Retrieve information about one or more oVirt/RHV storage domains
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_storage_domain_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -94,7 +94,8 @@ def main():
is_old_facts = module._name in ('ovirt_storage_domain_facts', 'community.general.ovirt_storage_domain_facts') is_old_facts = module._name in ('ovirt_storage_domain_facts', 'community.general.ovirt_storage_domain_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_storage_domain_facts' module has been renamed to 'ovirt_storage_domain_info', " 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) check_sdk(module)

View file

@ -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. short_description: Retrieve information about one or more oVirt/RHV templates relate to a storage domain.
author: "Maor Lipchuk (@machacekondra)" author: "Maor Lipchuk (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_storage_template_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -102,7 +102,8 @@ def main():
is_old_facts = module._name in ('ovirt_storage_template_facts', 'community.general.ovirt_storage_template_facts') is_old_facts = module._name in ('ovirt_storage_template_facts', 'community.general.ovirt_storage_template_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_storage_template_facts' module has been renamed to 'ovirt_storage_template_info', " 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) check_sdk(module)

View file

@ -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. short_description: Retrieve information about one or more oVirt/RHV virtual machines relate to a storage domain.
author: "Maor Lipchuk (@machacekondra)" author: "Maor Lipchuk (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_storage_vm_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -102,7 +102,8 @@ def main():
is_old_facts = module._name in ('ovirt_storage_vm_facts', 'community.general.ovirt_storage_vm_facts') is_old_facts = module._name in ('ovirt_storage_vm_facts', 'community.general.ovirt_storage_vm_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_storage_vm_facts' module has been renamed to 'ovirt_storage_vm_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_tag_facts
short_description: Retrieve information about one or more oVirt/RHV tags short_description: Retrieve information about one or more oVirt/RHV tags
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_tag_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -118,7 +118,8 @@ def main():
is_old_facts = module._name in ('ovirt_tag_facts', 'community.general.ovirt_tag_facts') is_old_facts = module._name in ('ovirt_tag_facts', 'community.general.ovirt_tag_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_tag_facts' module has been renamed to 'ovirt_tag_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_template_facts
short_description: Retrieve information about one or more oVirt/RHV templates short_description: Retrieve information about one or more oVirt/RHV templates
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_template_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -92,7 +92,8 @@ def main():
is_old_facts = module._name in ('ovirt_template_facts', 'community.general.ovirt_template_facts') is_old_facts = module._name in ('ovirt_template_facts', 'community.general.ovirt_template_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_template_facts' module has been renamed to 'ovirt_template_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_user_facts
short_description: Retrieve information about one or more oVirt/RHV users short_description: Retrieve information about one or more oVirt/RHV users
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_user_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -91,7 +91,8 @@ def main():
is_old_facts = module._name in ('ovirt_user_facts', 'community.general.ovirt_user_facts') is_old_facts = module._name in ('ovirt_user_facts', 'community.general.ovirt_user_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_user_facts' module has been renamed to 'ovirt_user_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_vm_facts
short_description: Retrieve information about one or more oVirt/RHV virtual machines short_description: Retrieve information about one or more oVirt/RHV virtual machines
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_vm_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -125,7 +125,8 @@ def main():
is_old_facts = module._name in ('ovirt_vm_facts', 'community.general.ovirt_vm_facts') is_old_facts = module._name in ('ovirt_vm_facts', 'community.general.ovirt_vm_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_vm_facts' module has been renamed to 'ovirt_vm_info', " 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) check_sdk(module)

View file

@ -28,7 +28,7 @@ module: ovirt_vmpool_facts
short_description: Retrieve information about one or more oVirt/RHV vmpools short_description: Retrieve information about one or more oVirt/RHV vmpools
author: "Ondra Machacek (@machacekondra)" author: "Ondra Machacek (@machacekondra)"
deprecated: 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. 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 alternative: Use C(ovirt_vmpool_info) from the C(ovirt.ovirt) collection instead
description: description:
@ -91,7 +91,8 @@ def main():
is_old_facts = module._name in ('ovirt_vmpool_facts', 'community.general.ovirt_vmpool_facts') is_old_facts = module._name in ('ovirt_vmpool_facts', 'community.general.ovirt_vmpool_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'ovirt_vmpool_facts' module has been renamed to 'ovirt_vmpool_info', " 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) check_sdk(module)

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_image_facts module: scaleway_image_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_image_info) instead. alternative: Use M(scaleway_image_info) instead.
short_description: Gather facts about the Scaleway images available. short_description: Gather facts about the Scaleway images available.

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_ip_facts module: scaleway_ip_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_ip_info) instead. alternative: Use M(scaleway_ip_info) instead.
short_description: Gather facts about the Scaleway ips available. short_description: Gather facts about the Scaleway ips available.

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_organization_facts module: scaleway_organization_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_organization_info) instead. alternative: Use M(scaleway_organization_info) instead.
short_description: Gather facts about the Scaleway organizations available. short_description: Gather facts about the Scaleway organizations available.

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_security_group_facts module: scaleway_security_group_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_security_group_info) instead. alternative: Use M(scaleway_security_group_info) instead.
short_description: Gather facts about the Scaleway security groups available. short_description: Gather facts about the Scaleway security groups available.

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_server_facts module: scaleway_server_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_server_info) instead. alternative: Use M(scaleway_server_info) instead.
short_description: Gather facts about the Scaleway servers available. short_description: Gather facts about the Scaleway servers available.

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_snapshot_facts module: scaleway_snapshot_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_snapshot_info) instead. alternative: Use M(scaleway_snapshot_info) instead.
short_description: Gather facts about the Scaleway snapshots available. short_description: Gather facts about the Scaleway snapshots available.

View file

@ -11,7 +11,7 @@ DOCUMENTATION = r'''
--- ---
module: scaleway_volume_facts module: scaleway_volume_facts
deprecated: deprecated:
removed_in: '2.13' removed_in: 3.0.0 # was Ansible 2.13
why: Deprecated in favour of C(_info) module. why: Deprecated in favour of C(_info) module.
alternative: Use M(scaleway_volume_info) instead. alternative: Use M(scaleway_volume_info) instead.
short_description: Gather facts about the Scaleway volumes available. short_description: Gather facts about the Scaleway volumes available.

View file

@ -48,7 +48,7 @@ EXAMPLES = '''
# When the module is called as smartos_image_facts, return values are published # When the module is called as smartos_image_facts, return values are published
# in ansible_facts['smartos_images'] and can be used as follows. # 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 - name: Print information
debug: debug:
msg: "{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }} 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') is_old_facts = module._name in ('smartos_image_facts', 'community.general.smartos_image_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'smartos_image_facts' module has been renamed to 'smartos_image_info', " 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) image_facts = ImageFacts(module)

View file

@ -206,7 +206,8 @@ def main():
) )
if module._name in ('xenserver_guest_facts', 'community.general.xenserver_guest_facts'): 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} result = {'failed': False, 'changed': False}

View file

@ -330,7 +330,7 @@ EXAMPLES = r'''
type: foreign_data_wrapper type: foreign_data_wrapper
role: reader role: reader
# Available since version 2.10 # Available since Ansible 2.10
- name: GRANT ALL PRIVILEGES ON TYPE customtype TO reader - name: GRANT ALL PRIVILEGES ON TYPE customtype TO reader
postgresql_privs: postgresql_privs:
db: test db: test
@ -359,7 +359,7 @@ EXAMPLES = r'''
objs: ALL_IN_SCHEMA objs: ALL_IN_SCHEMA
schema: common 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 # 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 # GRANT SELECT privileges for new TABLES objects created by librarian as
# default to the role reader. # default to the role reader.
@ -390,7 +390,7 @@ EXAMPLES = r'''
role: reader role: reader
target_roles: librarian target_roles: librarian
# Available since version 2.10 # Available since Ansible 2.10
- name: Grant type privileges for pg_catalog.numeric type to alice - name: Grant type privileges for pg_catalog.numeric type to alice
postgresql_privs: postgresql_privs:
type: type type: type

View file

@ -231,7 +231,8 @@ def main():
is_old_facts = module._name in ('vertica_facts', 'community.general.vertica_facts') is_old_facts = module._name in ('vertica_facts', 'community.general.vertica_facts')
if is_old_facts: if is_old_facts:
module.deprecate("The 'vertica_facts' module has been renamed to 'vertica_info', " 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: if not pyodbc_found:
module.fail_json(msg=missing_required_lib('pyodbc'), exception=PYODBC_IMP_ERR) module.fail_json(msg=missing_required_lib('pyodbc'), exception=PYODBC_IMP_ERR)

View file

@ -51,7 +51,7 @@ options:
description: description:
- If C(yes), which will replace the remote file when contents are different than the source. - 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. - 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 type: bool
default: yes default: yes
aliases: [ thirsty ] aliases: [ thirsty ]
@ -112,7 +112,8 @@ def main():
executable = module.params['executable'] executable = module.params['executable']
if module.params.get('thirsty'): 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( result = dict(
changed=False, changed=False,

View file

@ -824,7 +824,7 @@ def main():
supports_check_mode=True, supports_check_mode=True,
required_by=dict( required_by=dict(
add_children=['xpath'], 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'], # attribute=['value'],
content=['xpath'], content=['xpath'],
set_children=['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.') 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 # 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: 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 # Check if the file exists
if xml_string: if xml_string:

View file

@ -1 +0,0 @@
./cloud/google/gcp_backend_service.py

View file

@ -1 +0,0 @@
./cloud/google/gcp_forwarding_rule.py

View file

@ -1 +0,0 @@
./cloud/google/gcp_healthcheck.py

View file

@ -1 +0,0 @@
./cloud/google/gcpubsub.py

View file

@ -0,0 +1 @@
cloud/google/gcpubsub_facts.py

View file

@ -1 +0,0 @@
./cloud/google/gcpubsub_info.py

View file

@ -380,7 +380,8 @@ def main():
if module._name in ('onepassword_facts', 'community.general.onepassword_facts'): if module._name in ('onepassword_facts', 'community.general.onepassword_facts'):
module.deprecate("The 'onepassword_facts' module has been renamed to 'onepassword_info'. " 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) module.exit_json(changed=False, ansible_facts=results)
else: else:
module.exit_json(changed=False, **results) module.exit_json(changed=False, **results)

Some files were not shown because too many files have changed in this diff Show more