mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
Prepare main for 7.0.0 (#6428)
* Bump version to 7.0.0. * Remove deprecated parameters and change some defaults for 7.0.0. * Remove deprecated alias. * Adjust tests.
This commit is contained in:
parent
f0fcc91ac7
commit
0a26b6d48d
16 changed files with 72 additions and 123 deletions
|
@ -309,11 +309,3 @@ class _CmdRunnerContext(object):
|
|||
|
||||
|
||||
cmd_runner_fmt = _Format()
|
||||
|
||||
#
|
||||
# The fmt form is deprecated and will be removed in community.general 7.0.0
|
||||
# Please use:
|
||||
# cmd_runner_fmt
|
||||
# Or, to retain the same effect, use:
|
||||
# from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt as fmt
|
||||
fmt = cmd_runner_fmt
|
||||
|
|
|
@ -114,8 +114,9 @@ options:
|
|||
- Whether the runner should be registered with an access level or not.
|
||||
- If set to C(true), the value of I(access_level) is used for runner registration.
|
||||
- If set to C(false), GitLab registers the runner with the default access level.
|
||||
- The current default of this option is C(false). This default is deprecated and will change to C(true) in commuinty.general 7.0.0.
|
||||
- The default of this option changed to C(true) in community.general 7.0.0. Before, it was C(false).
|
||||
required: false
|
||||
default: true
|
||||
type: bool
|
||||
version_added: 6.3.0
|
||||
maximum_timeout:
|
||||
|
@ -252,13 +253,6 @@ class GitLabRunner(object):
|
|||
arguments['token'] = options['registration_token']
|
||||
|
||||
access_level_on_creation = self._module.params['access_level_on_creation']
|
||||
if access_level_on_creation is None:
|
||||
message = "The option 'access_level_on_creation' is unspecified, so 'false' is assumed. "\
|
||||
"That means any value of 'access_level' is ignored and GitLab registers the runner with its default value. "\
|
||||
"The option 'access_level_on_creation' will switch to 'true' in community.general 7.0.0"
|
||||
self._module.deprecate(message, version='7.0.0', collection_name='community.general')
|
||||
access_level_on_creation = False
|
||||
|
||||
if not access_level_on_creation:
|
||||
arguments.pop('access_level', None)
|
||||
|
||||
|
@ -366,7 +360,7 @@ def main():
|
|||
run_untagged=dict(type='bool', default=True),
|
||||
locked=dict(type='bool', default=False),
|
||||
access_level=dict(type='str', choices=["not_protected", "ref_protected"]),
|
||||
access_level_on_creation=dict(type='bool'),
|
||||
access_level_on_creation=dict(type='bool', default=True),
|
||||
maximum_timeout=dict(type='int', default=3600),
|
||||
registration_token=dict(type='str', no_log=True),
|
||||
project=dict(type='str'),
|
||||
|
|
|
@ -61,18 +61,6 @@ options:
|
|||
description:
|
||||
- The name of the user/process that triggered this deployment
|
||||
required: false
|
||||
appname:
|
||||
type: str
|
||||
description:
|
||||
- Name of the application.
|
||||
- This option has been deprecated and will be removed in community.general 7.0.0. Please do not use.
|
||||
required: false
|
||||
environment:
|
||||
type: str
|
||||
description:
|
||||
- The environment for this deployment.
|
||||
- This option has been deprecated and will be removed community.general 7.0.0. Please do not use.
|
||||
required: false
|
||||
validate_certs:
|
||||
description:
|
||||
- If C(false), SSL certificates will not be validated. This should only be used
|
||||
|
@ -113,8 +101,6 @@ def main():
|
|||
description=dict(required=False),
|
||||
revision=dict(required=True),
|
||||
user=dict(required=False),
|
||||
appname=dict(required=False, removed_in_version='7.0.0', removed_from_collection='community.general'),
|
||||
environment=dict(required=False, removed_in_version='7.0.0', removed_from_collection='community.general'),
|
||||
validate_certs=dict(default=True, type='bool'),
|
||||
),
|
||||
required_one_of=[['app_name', 'application_id']],
|
||||
|
|
|
@ -397,9 +397,9 @@ options:
|
|||
description:
|
||||
- This is only used with 'bridge-slave' - 'hairpin mode' for the slave, which allows frames to be sent back out through the slave the
|
||||
frame was received on.
|
||||
- The default value is C(true), but that is being deprecated
|
||||
and it will be changed to C(false) in community.general 7.0.0.
|
||||
- The default change to C(false) in community.general 7.0.0. It used to be C(true) before.
|
||||
type: bool
|
||||
default: false
|
||||
runner:
|
||||
description:
|
||||
- This is the type of device or network connection that you wish to create for a team.
|
||||
|
@ -1519,8 +1519,7 @@ class Nmcli(object):
|
|||
self.hellotime = module.params['hellotime']
|
||||
self.maxage = module.params['maxage']
|
||||
self.ageingtime = module.params['ageingtime']
|
||||
# hairpin should be back to normal in 7.0.0
|
||||
self._hairpin = module.params['hairpin']
|
||||
self.hairpin = module.params['hairpin']
|
||||
self.path_cost = module.params['path_cost']
|
||||
self.mac = module.params['mac']
|
||||
self.runner = module.params['runner']
|
||||
|
@ -1571,18 +1570,6 @@ class Nmcli(object):
|
|||
|
||||
self.edit_commands = []
|
||||
|
||||
@property
|
||||
def hairpin(self):
|
||||
if self._hairpin is None:
|
||||
self.module.deprecate(
|
||||
"Parameter 'hairpin' default value will change from true to false in community.general 7.0.0. "
|
||||
"Set the value explicitly to suppress this warning.",
|
||||
version='7.0.0', collection_name='community.general',
|
||||
)
|
||||
# Should be False in 7.0.0 but then that should be in argument_specs
|
||||
self._hairpin = True
|
||||
return self._hairpin
|
||||
|
||||
def execute_command(self, cmd, use_unsafe_shell=False, data=None):
|
||||
if isinstance(cmd, list):
|
||||
cmd = [to_text(item) for item in cmd]
|
||||
|
@ -2366,7 +2353,7 @@ def main():
|
|||
hellotime=dict(type='int', default=2),
|
||||
maxage=dict(type='int', default=20),
|
||||
ageingtime=dict(type='int', default=300),
|
||||
hairpin=dict(type='bool'),
|
||||
hairpin=dict(type='bool', default=False),
|
||||
path_cost=dict(type='int', default=100),
|
||||
# team specific vars
|
||||
runner=dict(type='str', default='roundrobin',
|
||||
|
|
|
@ -154,10 +154,9 @@ options:
|
|||
unprivileged:
|
||||
description:
|
||||
- Indicate if the container should be unprivileged.
|
||||
- >
|
||||
The default value for this parameter is C(false) but that is deprecated
|
||||
and it will be replaced with C(true) in community.general 7.0.0.
|
||||
- The default change to C(true) in community.general 7.0.0. It used to be C(false) before.
|
||||
type: bool
|
||||
default: true
|
||||
description:
|
||||
description:
|
||||
- Specify the description for the container. Only used on the configuration web interface.
|
||||
|
@ -600,7 +599,7 @@ def main():
|
|||
purge=dict(type='bool', default=False),
|
||||
state=dict(default='present', choices=['present', 'absent', 'stopped', 'started', 'restarted']),
|
||||
pubkey=dict(type='str'),
|
||||
unprivileged=dict(type='bool'),
|
||||
unprivileged=dict(type='bool', default=True),
|
||||
description=dict(type='str'),
|
||||
hookscript=dict(type='str'),
|
||||
proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']),
|
||||
|
@ -643,14 +642,6 @@ def main():
|
|||
timeout = module.params['timeout']
|
||||
clone = module.params['clone']
|
||||
|
||||
if module.params['unprivileged'] is None:
|
||||
module.params['unprivileged'] = False
|
||||
module.deprecate(
|
||||
'The default value `false` for the parameter "unprivileged" is deprecated and it will be replaced with `true`',
|
||||
version='7.0.0',
|
||||
collection_name='community.general'
|
||||
)
|
||||
|
||||
if module.params['proxmox_default_behavior'] == 'compatibility':
|
||||
old_default_values = dict(
|
||||
disk="3",
|
||||
|
|
|
@ -114,8 +114,6 @@ options:
|
|||
show_diff:
|
||||
description:
|
||||
- Whether to print file changes details
|
||||
- Alias C(show-diff) has been deprecated and will be removed in community.general 7.0.0.
|
||||
aliases: ['show-diff']
|
||||
type: bool
|
||||
default: false
|
||||
requirements:
|
||||
|
@ -198,9 +196,7 @@ def main():
|
|||
noop=dict(type='bool'),
|
||||
logdest=dict(type='str', default='stdout', choices=['all', 'stdout', 'syslog']),
|
||||
# The following is not related to Ansible's diff; see https://github.com/ansible-collections/community.general/pull/3980#issuecomment-1005666154
|
||||
show_diff=dict(
|
||||
type='bool', default=False, aliases=['show-diff'],
|
||||
deprecated_aliases=[dict(name='show-diff', version='7.0.0', collection_name='community.general')]),
|
||||
show_diff=dict(type='bool', default=False),
|
||||
facts=dict(type='dict'),
|
||||
facter_basename=dict(type='str', default='ansible'),
|
||||
environment=dict(type='str'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue