From 74b94e119ef3bea57e12ae4ac5ca5820575fc5a8 Mon Sep 17 00:00:00 2001 From: Eric Helms Date: Wed, 19 Sep 2018 12:41:54 -0400 Subject: [PATCH] Deprecate foreman and katello modules (#42043) * Deprecate foreman and katello modules in 2.8, remove in 2.12 --- docs/docsite/rst/porting_guides/porting_guide_2.8.rst | 5 +++++ .../foreman/{foreman.py => _foreman.py} | 11 ++++++++++- .../foreman/{katello.py => _katello.py} | 6 +++++- test/sanity/pylint/ignore.txt | 4 ++-- 4 files changed, 22 insertions(+), 4 deletions(-) rename lib/ansible/modules/remote_management/foreman/{foreman.py => _foreman.py} (91%) rename lib/ansible/modules/remote_management/foreman/{katello.py => _katello.py} (98%) diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst index 04770b9acb..c1e66cf337 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst @@ -67,10 +67,15 @@ Deprecation notices The following modules will be removed in Ansible 2.12. Please update your playbooks accordingly. +* ``foreman`` use instead. +* ``katello`` use instead. + Noteworthy module changes ------------------------- +* The ``foreman`` and ``katello`` modules have been deprecated in favor of a set of modules that are broken out per entity with better idempotency in mind. +* The ``foreman`` and ``katello`` modules replacement is officially part of the Foreman Community and supported there. * The ``tower_credential`` module originally required the ``ssh_key_data`` to be the path to a ssh_key_file. In order to work like Tower/AWX, ``ssh_key_data`` now contains the content of the file. The previous behavior can be achieved with ``lookup('file', '/path/to/file')``. diff --git a/lib/ansible/modules/remote_management/foreman/foreman.py b/lib/ansible/modules/remote_management/foreman/_foreman.py similarity index 91% rename from lib/ansible/modules/remote_management/foreman/foreman.py rename to lib/ansible/modules/remote_management/foreman/_foreman.py index e4e0cd60ca..8231b2334e 100644 --- a/lib/ansible/modules/remote_management/foreman/foreman.py +++ b/lib/ansible/modules/remote_management/foreman/_foreman.py @@ -8,13 +8,17 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: foreman short_description: Manage Foreman Resources +deprecated: + removed_in: "2.12" + why: "Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules" + alternative: https://github.com/theforeman/foreman-ansible-modules description: - Allows the management of Foreman resources inside your Foreman server. version_added: "2.3" @@ -33,6 +37,11 @@ options: description: - Username on Foreman server. required: true + verify_ssl: + description: + - Whether to verify an SSL connection to Foreman server. + type: bool + default: False password: description: - Password for user accessing Foreman server. diff --git a/lib/ansible/modules/remote_management/foreman/katello.py b/lib/ansible/modules/remote_management/foreman/_katello.py similarity index 98% rename from lib/ansible/modules/remote_management/foreman/katello.py rename to lib/ansible/modules/remote_management/foreman/_katello.py index e91c22dfbf..bb668c4e35 100644 --- a/lib/ansible/modules/remote_management/foreman/katello.py +++ b/lib/ansible/modules/remote_management/foreman/_katello.py @@ -8,13 +8,17 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: katello short_description: Manage Katello Resources +deprecated: + removed_in: "2.12" + why: "Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules" + alternative: https://github.com/theforeman/foreman-ansible-modules description: - Allows the management of Katello resources inside your Foreman server. version_added: "2.3" diff --git a/test/sanity/pylint/ignore.txt b/test/sanity/pylint/ignore.txt index 786d90293c..980e625e40 100644 --- a/test/sanity/pylint/ignore.txt +++ b/test/sanity/pylint/ignore.txt @@ -51,8 +51,8 @@ lib/ansible/modules/network/nxos/nxos_snapshot.py ansible-format-automatic-speci lib/ansible/modules/network/vyos/vyos_vlan.py ansible-format-automatic-specification lib/ansible/modules/notification/cisco_spark.py ansible-format-automatic-specification lib/ansible/modules/notification/logentries_msg.py ansible-format-automatic-specification -lib/ansible/modules/remote_management/foreman/foreman.py ansible-format-automatic-specification -lib/ansible/modules/remote_management/foreman/katello.py ansible-format-automatic-specification +lib/ansible/modules/remote_management/foreman/_foreman.py ansible-format-automatic-specification +lib/ansible/modules/remote_management/foreman/_katello.py ansible-format-automatic-specification lib/ansible/modules/source_control/github_deploy_key.py ansible-format-automatic-specification lib/ansible/modules/source_control/github_key.py ansible-format-automatic-specification lib/ansible/modules/storage/infinidat/infini_export.py ansible-format-automatic-specification