mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2025-10-25 05:23:58 -07:00 
			
		
		
		
	Remove deprecated features scheduled for removal in 3.0.0 (#1926)
* Remove deprecated features. * Remove ignore.txt entries. * Update changelogs/fragments/remove-deprecated-features.yml Co-authored-by: Joe Adams <adams10301@gmail.com> Co-authored-by: Joe Adams <adams10301@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								1ca9229c66
							
						
					
				
			
			
				commit
				
					
						36daa7c48e
					
				
			
		
					 16 changed files with 58 additions and 208 deletions
				
			
		|  | @ -17,13 +17,6 @@ description: | |||
|     - "Manage OpenBSD system patches using syspatch." | ||||
| 
 | ||||
| options: | ||||
|     apply: | ||||
|         type: bool | ||||
|         description: | ||||
|             - Apply all available system patches. | ||||
|             - By default, apply all patches. | ||||
|             - Deprecated. Will be removed in community.general 3.0.0. | ||||
|         default: yes | ||||
|     revert: | ||||
|         description: | ||||
|             - Revert system patches. | ||||
|  | @ -37,7 +30,6 @@ author: | |||
| EXAMPLES = ''' | ||||
| - name: Apply all available system patches | ||||
|   community.general.syspatch: | ||||
|     apply: true | ||||
| 
 | ||||
| - name: Revert last patch | ||||
|   community.general.syspatch: | ||||
|  | @ -50,7 +42,6 @@ EXAMPLES = ''' | |||
| # NOTE: You can reboot automatically if a patch requires it: | ||||
| - name: Apply all patches and store result | ||||
|   community.general.syspatch: | ||||
|     apply: true | ||||
|   register: syspatch | ||||
| 
 | ||||
| - name: Reboot if patch requires it | ||||
|  | @ -86,14 +77,12 @@ from ansible.module_utils.basic import AnsibleModule | |||
| def run_module(): | ||||
|     # define available arguments/parameters a user can pass to the module | ||||
|     module_args = dict( | ||||
|         apply=dict(type='bool', default=True, removed_in_version='3.0.0', removed_from_collection='community.general'), | ||||
|         revert=dict(type='str', choices=['all', 'one']) | ||||
|     ) | ||||
| 
 | ||||
|     module = AnsibleModule( | ||||
|         argument_spec=module_args, | ||||
|         supports_check_mode=True, | ||||
|         required_one_of=[['apply', 'revert']] | ||||
|     ) | ||||
| 
 | ||||
|     result = syspatch_run(module) | ||||
|  | @ -117,7 +106,7 @@ def syspatch_run(module): | |||
|             run_flag = ['-R'] | ||||
|         else: | ||||
|             run_flag = ['-r'] | ||||
|     elif module.params['apply']: | ||||
|     else: | ||||
|         check_flag = ['-c'] | ||||
|         run_flag = [] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue