Rename to ansible-core (#72594)

Change:
- Initial set of changes for renaming to ansible-core
- Includes changelog fragment changes from base -> core
- Does NOT include docs changes
- Modifies detection stuff in setup.py to support ansible<2.9 and ansible-base

Test Plan:
- ci_complete
pull/72624/head
Rick Elrod 4 years ago committed by GitHub
parent 452bc3af04
commit 6894ae7d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
.gitignore vendored

@ -79,6 +79,8 @@ Vagrantfile
/lib/ansible.egg-info/ /lib/ansible.egg-info/
# First used in the `devel` branch during Ansible 2.10 development. # First used in the `devel` branch during Ansible 2.10 development.
/lib/ansible_base.egg-info/ /lib/ansible_base.egg-info/
# First used in the `devel` branch during Ansible 2.11 development.
/lib/ansible_core.egg-info/
/shippable/ /shippable/
/test/integration/cloud-config-*.* /test/integration/cloud-config-*.*
!/test/integration/cloud-config-*.*.template !/test/integration/cloud-config-*.*.template

@ -14,7 +14,7 @@
######################################################## ########################################################
# variable section # variable section
NAME = ansible-base NAME = ansible-core
OS = $(shell uname -s) OS = $(shell uname -s)
PREFIX ?= '/usr/local' PREFIX ?= '/usr/local'
SDIST_DIR ?= 'dist' SDIST_DIR ?= 'dist'

@ -1,4 +1,4 @@
bugfixes: bugfixes:
- apt_repository - fixes ``mode`` doc to remove ineffective default (https://github.com/ansible/ansible/pull/70319). - apt_repository - fixes ``mode`` doc to remove ineffective default (https://github.com/ansible/ansible/pull/70319).
deprecated_features: deprecated_features:
- apt_key - the paramater ``key`` does not have any effect, has been deprecated and will be removed in ansible-base version 2.14 (https://github.com/ansible/ansible/pull/70319). - apt_key - the paramater ``key`` does not have any effect, has been deprecated and will be removed in ansible-core version 2.14 (https://github.com/ansible/ansible/pull/70319).

@ -1,2 +1,2 @@
minor_changes: minor_changes:
- "The plugin loader now keeps track of the collection where a plugin was resolved to, in particular whether the plugin was loaded from ansible-base's internal paths (``ansible.builtin``) or from user-supplied paths (no collection name)." - "The plugin loader now keeps track of the collection where a plugin was resolved to, in particular whether the plugin was loaded from ansible-core's internal paths (``ansible.builtin``) or from user-supplied paths (no collection name)."

@ -39,7 +39,7 @@ def _ensure_vendored_path_entry():
already_loaded_vendored_modules = set(sys.modules.keys()).intersection(vendored_module_names) already_loaded_vendored_modules = set(sys.modules.keys()).intersection(vendored_module_names)
if already_loaded_vendored_modules: if already_loaded_vendored_modules:
warnings.warn('One or more Python packages bundled by this ansible-base distribution were already ' warnings.warn('One or more Python packages bundled by this ansible-core distribution were already '
'loaded ({0}). This may result in undefined behavior.'.format(', '.join(sorted(already_loaded_vendored_modules)))) 'loaded ({0}). This may result in undefined behavior.'.format(', '.join(sorted(already_loaded_vendored_modules))))

@ -352,7 +352,7 @@ class Display(with_metaclass(Singleton, object)):
msg += '.' msg += '.'
if collection_name == 'ansible.builtin': if collection_name == 'ansible.builtin':
collection_name = 'ansible-base' collection_name = 'ansible-core'
if removed: if removed:
header = '[DEPRECATED]: {0}'.format(msg) header = '[DEPRECATED]: {0}'.format(msg)

@ -1,4 +1,4 @@
ansible-base (%VERSION%-%RELEASE%~%DIST%) %DIST%; urgency=low ansible-core (%VERSION%-%RELEASE%~%DIST%) %DIST%; urgency=low
* %VERSION% release * %VERSION% release

@ -1,4 +1,4 @@
Source: ansible-base Source: ansible-core
Section: admin Section: admin
Priority: optional Priority: optional
Standards-Version: 3.9.3 Standards-Version: 3.9.3
@ -6,7 +6,7 @@ Maintainer: Ansible, Inc. <info@ansible.com>
Build-Depends: cdbs, debhelper (>= 5.0.0), python3-docutils, python3, dh-python | python-support, python3-setuptools, lsb-release, python3-straight.plugin, python3-packaging, python3-jinja2 Build-Depends: cdbs, debhelper (>= 5.0.0), python3-docutils, python3, dh-python | python-support, python3-setuptools, lsb-release, python3-straight.plugin, python3-packaging, python3-jinja2
Homepage: https://github.com/ansible/ansible/ Homepage: https://github.com/ansible/ansible/
Package: ansible-base Package: ansible-core
Architecture: all Architecture: all
Depends: python3-jinja2, python3-yaml, python3-paramiko, python3-cryptography, sshpass, ${misc:Depends}, ${python:Depends} Depends: python3-jinja2, python3-yaml, python3-paramiko, python3-cryptography, sshpass, ${misc:Depends}, ${python:Depends}
Description: Ansible IT Automation Description: Ansible IT Automation
@ -18,7 +18,7 @@ Description: Ansible IT Automation
Package: ansible-test Package: ansible-test
Architecture: all Architecture: all
Depends: ansible-base (= ${binary:Version}), python3-venv, ${misc:Depends} Depends: ansible-core (= ${binary:Version}), python3-venv, ${misc:Depends}
Description: Ansible IT Automation Description: Ansible IT Automation
Ansible is a radically simple model-driven configuration management, Ansible is a radically simple model-driven configuration management,
multi-node deployment, and remote task execution system. Ansible works multi-node deployment, and remote task execution system. Ansible works

@ -1,7 +1,7 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# -- makefile -- # -- makefile --
DEB_PYTHON3_MODULE_PACKAGES=ansible-base ansible_test DEB_PYTHON3_MODULE_PACKAGES=ansible-core ansible_test
#DEB_PYTHON_INSTALL_ARGS_ALL="--install-purelib=/usr/lib/python2.7/site-packages/" #DEB_PYTHON_INSTALL_ARGS_ALL="--install-purelib=/usr/lib/python2.7/site-packages/"
DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL = /usr/lib/python3/dist-packages/ DEB_PYTHON_DISTUTILS_INSTALLDIR_SKEL = /usr/lib/python3/dist-packages/

@ -50,9 +50,9 @@ def find_package_info(*file_paths):
raise RuntimeError("Unable to find package info.") raise RuntimeError("Unable to find package info.")
def _validate_install_ansible_base(): def _validate_install_ansible_core():
"""Validate that we can install ansible-base. Currently this only """Validate that we can install ansible-core. This checks if
cares about upgrading to ansible-base from ansible<2.10 ansible<=2.9 or ansible-base>=2.10 are installed.
""" """
# Skip common commands we can ignore # Skip common commands we can ignore
# Do NOT add bdist_wheel here, we don't ship wheels # Do NOT add bdist_wheel here, we don't ship wheels
@ -80,31 +80,36 @@ def _validate_install_ansible_base():
pass pass
else: else:
version_tuple = tuple(int(v) for v in __version__.split('.')[:2]) version_tuple = tuple(int(v) for v in __version__.split('.')[:2])
if version_tuple < (2, 10): if version_tuple >= (2, 11):
stars = '*' * 76 return
raise RuntimeError( elif version_tuple == (2, 10):
''' ansible_name = 'ansible-base'
else:
ansible_name = 'ansible'
stars = '*' * 76
raise RuntimeError(
'''
%s %s
Cannot install ansible-base with a pre-existing ansible==%s Cannot install ansible-core with a pre-existing %s==%s
installation. installation.
Installing ansible-base with ansible-2.9 or older currently installed with Installing ansible-core with ansible-2.9 or older, or ansible-base-2.10
pip is known to cause problems. Please uninstall ansible and install the new currently installed with pip is known to cause problems. Please uninstall
version: %s and install the new version:
pip uninstall ansible pip uninstall %s
pip install ansible-base pip install ansible-core
If you want to skip the conflict checks and manually resolve any issues If you want to skip the conflict checks and manually resolve any issues
afterwards, set the ANSIBLE_SKIP_CONFLICT_CHECK environment variable: afterwards, set the ANSIBLE_SKIP_CONFLICT_CHECK environment variable:
ANSIBLE_SKIP_CONFLICT_CHECK=1 pip install ansible-base ANSIBLE_SKIP_CONFLICT_CHECK=1 pip install ansible-core
%s %s
''' % (stars, __version__, stars) ''' % (stars, ansible_name, __version__, ansible_name, ansible_name, stars))
)
finally: finally:
sys.path[:] = sys_path sys.path[:] = sys_path
for key in sys_modules_keys.symmetric_difference(sys.modules): for key in sys_modules_keys.symmetric_difference(sys.modules):
@ -112,7 +117,7 @@ def _validate_install_ansible_base():
sys.modules.update(sys_modules) sys.modules.update(sys_modules)
_validate_install_ansible_base() _validate_install_ansible_core()
SYMLINK_CACHE = 'SYMLINK_CACHE.json' SYMLINK_CACHE = 'SYMLINK_CACHE.json'
@ -347,7 +352,7 @@ static_setup_params = dict(
'install_scripts': InstallScriptsCommand, 'install_scripts': InstallScriptsCommand,
'sdist': SDistCommand, 'sdist': SDistCommand,
}, },
name='ansible-base', name='ansible-core',
version=__version__, version=__version__,
description='Radically simple IT automation', description='Radically simple IT automation',
author=__author__, author=__author__,

@ -1,3 +1,3 @@
# use a plugin redirected by core to a collection to ensure inventory redirection and redirected config names are working # use a plugin redirected by core to a collection to ensure inventory redirection and redirected config names are working
plugin: formerly_core_inventory # this is defined in the ansible-base runtime.yml routing to point at testns.content_adj.statichost plugin: formerly_core_inventory # this is defined in the ansible-core runtime.yml routing to point at testns.content_adj.statichost
hostname: dynamic_host_redirected hostname: dynamic_host_redirected

@ -30,7 +30,7 @@
state: present state: present
when: ansible_facts.distribution not in ['Alpine', 'MacOSX'] when: ansible_facts.distribution not in ['Alpine', 'MacOSX']
# apk isn't available on ansible-base so just call command # apk isn't available on ansible-core so just call command
- name: Alpine - Install Kerberos system packages - name: Alpine - Install Kerberos system packages
command: apk add {{ krb5_packages | join(' ') }} command: apk add {{ krb5_packages | join(' ') }}
when: ansible_facts.distribution == 'Alpine' when: ansible_facts.distribution == 'Alpine'

@ -87,7 +87,7 @@
ignore_errors: yes ignore_errors: yes
register: misuse_of_changed register: misuse_of_changed
# providing artificial task results since there are no modules in ansible-base that provide a 'results' list instead of 'changed' # providing artificial task results since there are no modules in ansible-core that provide a 'results' list instead of 'changed'
- name: Prepare artificial task results - name: Prepare artificial task results
set_fact: set_fact:
results_all_changed: results_all_changed:

@ -1,5 +1,5 @@
default name=quay.io/ansible/default-test-container:2.9.0 python=3.6,2.6,2.7,3.5,3.7,3.8,3.9 seccomp=unconfined context=collection default name=quay.io/ansible/default-test-container:2.9.0 python=3.6,2.6,2.7,3.5,3.7,3.8,3.9 seccomp=unconfined context=collection
default name=quay.io/ansible/ansible-base-test-container:1.7.0 python=3.6,2.6,2.7,3.5,3.7,3.8,3.9 seccomp=unconfined context=ansible-base default name=quay.io/ansible/ansible-base-test-container:1.7.0 python=3.6,2.6,2.7,3.5,3.7,3.8,3.9 seccomp=unconfined context=ansible-core
alpine3 name=quay.io/ansible/alpine3-test-container:1.19.0 python=3.8 alpine3 name=quay.io/ansible/alpine3-test-container:1.19.0 python=3.8
centos6 name=quay.io/ansible/centos6-test-container:1.17.0 python=2.6 seccomp=unconfined centos6 name=quay.io/ansible/centos6-test-container:1.17.0 python=2.6 seccomp=unconfined
centos7 name=quay.io/ansible/centos7-test-container:1.17.0 python=2.7 seccomp=unconfined centos7 name=quay.io/ansible/centos7-test-container:1.17.0 python=2.7 seccomp=unconfined

@ -1,2 +1,2 @@
jinja2 # ansible-base requirement jinja2 # ansible-core requirement
pyyaml # ansible-base requirement pyyaml # ansible-core requirement

@ -1,3 +1,3 @@
jinja2 # ansible-base requirement jinja2 # ansible-core requirement
pyyaml # needed for collection_detail.py pyyaml # needed for collection_detail.py
voluptuous voluptuous

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
"""Schema validation of ansible-base's ansible_builtin_runtime.yml and collection's meta/runtime.yml""" """Schema validation of ansible-core's ansible_builtin_runtime.yml and collection's meta/runtime.yml"""
from __future__ import (absolute_import, division, print_function) from __future__ import (absolute_import, division, print_function)
__metaclass__ = type __metaclass__ = type

@ -55,14 +55,14 @@ MSGS = {
"ansible-deprecated-no-collection-name", "ansible-deprecated-no-collection-name",
"The current collection name in format `namespace.name` must " "The current collection name in format `namespace.name` must "
"be provided as collection_name when calling Display.deprecated " "be provided as collection_name when calling Display.deprecated "
"or AnsibleModule.deprecate (`ansible.builtin` for ansible-base)", "or AnsibleModule.deprecate (`ansible.builtin` for ansible-core)",
{'minversion': (2, 6)}), {'minversion': (2, 6)}),
'E9507': ("Wrong collection name (%r) found in call to " 'E9507': ("Wrong collection name (%r) found in call to "
"Display.deprecated or AnsibleModule.deprecate", "Display.deprecated or AnsibleModule.deprecate",
"wrong-collection-deprecated", "wrong-collection-deprecated",
"The name of the current collection must be passed to the " "The name of the current collection must be passed to the "
"Display.deprecated resp. AnsibleModule.deprecate calls " "Display.deprecated resp. AnsibleModule.deprecate calls "
"(`ansible.builtin` for ansible-base)", "(`ansible.builtin` for ansible-core)",
{'minversion': (2, 6)}), {'minversion': (2, 6)}),
'E9508': ("Expired date (%r) found in call to Display.deprecated " 'E9508': ("Expired date (%r) found in call to Display.deprecated "
"or AnsibleModule.deprecate", "or AnsibleModule.deprecate",

@ -155,7 +155,7 @@ def check_removal_version(v, version_field, collection_name_field, error_code='i
parsed_version.parse(version) parsed_version.parse(version)
except ValueError as exc: except ValueError as exc:
raise _add_ansible_error_code( raise _add_ansible_error_code(
Invalid('%s (%r) is not a valid ansible-base version: %s' % (version_field, version, exc)), Invalid('%s (%r) is not a valid ansible-core version: %s' % (version_field, version, exc)),
error_code=error_code) error_code=error_code)
return v return v
try: try:
@ -283,7 +283,7 @@ def version_added(v, error_code='version-added-invalid', accept_historical=False
version.parse(version_added) version.parse(version_added)
except ValueError as exc: except ValueError as exc:
raise _add_ansible_error_code( raise _add_ansible_error_code(
Invalid('version_added (%r) is not a valid ansible-base version: ' Invalid('version_added (%r) is not a valid ansible-core version: '
'%s' % (version_added, exc)), '%s' % (version_added, exc)),
error_code=error_code) error_code=error_code)
else: else:

@ -153,7 +153,7 @@ def get_parameterized_completion(cache, name):
if data_context().content.collection: if data_context().content.collection:
context = 'collection' context = 'collection'
else: else:
context = 'ansible-base' context = 'ansible-core'
images = read_lines_without_comments(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'completion', '%s.txt' % name), remove_blank_lines=True) images = read_lines_without_comments(os.path.join(ANSIBLE_TEST_DATA_ROOT, 'completion', '%s.txt' % name), remove_blank_lines=True)

@ -1,2 +1,2 @@
jinja2 # ansible-base requirement jinja2 # ansible-core requirement
pyyaml pyyaml

@ -1,7 +1,7 @@
docutils docutils
jinja2 jinja2
packaging packaging
pyyaml # ansible-base requirement pyyaml # ansible-core requirement
rstcheck rstcheck
setuptools > 39.2 setuptools > 39.2
straight.plugin straight.plugin

Loading…
Cancel
Save