- Update to version 0.3.7 and 0.3.8
https://github.com/freeipa/ansible-freeipa/releases/tag/v0.3.7 https://github.com/freeipa/ansible-freeipa/releases/tag/v0.3.8 Related: RHBZ#1972178 - automember: Verify condition keys Resolves: RHBZ#1981713 - automember: Fix result["failed"] issues with conditions Resolves: RHBZ#1981713 - automember: Fix action to be automember or member, not service Resolves: RHBZ#1981711
This commit is contained in:
		
							parent
							
								
									e4b2de09ff
								
							
						
					
					
						commit
						7b8dbcae39
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -12,3 +12,4 @@ | |||||||
| /ansible-freeipa-0.3.4.tar.gz | /ansible-freeipa-0.3.4.tar.gz | ||||||
| /ansible-freeipa-0.3.5.tar.gz | /ansible-freeipa-0.3.5.tar.gz | ||||||
| /ansible-freeipa-0.3.6.tar.gz | /ansible-freeipa-0.3.6.tar.gz | ||||||
|  | /ansible-freeipa-0.3.8.tar.gz | ||||||
|  | |||||||
| @ -1,115 +0,0 @@ | |||||||
| From db208bd6c11afda738b254b4d21b3cfb5307a3fd Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Thomas Woerner <twoerner@redhat.com> |  | ||||||
| Date: Wed, 9 Jun 2021 10:53:34 +0200 |  | ||||||
| Subject: [PATCH] ipabackup: Use module to get IPA_BACKUP_DIR from ipaplatform |  | ||||||
| 
 |  | ||||||
| Up to now a python snippet was used to get IPA_BACKUP_DIR from ipaplatform |  | ||||||
| but this was not working when ansible_facts was false due to not getting |  | ||||||
| ansible_python_interpreter set. |  | ||||||
| 
 |  | ||||||
| The module version is also working if gather_facts is turned off. |  | ||||||
| ---
 |  | ||||||
|  .../library/ipabackup_get_backup_dir.py       | 69 +++++++++++++++++++ |  | ||||||
|  roles/ipabackup/tasks/get_ipabackup_dir.yml   | 12 ++-- |  | ||||||
|  2 files changed, 73 insertions(+), 8 deletions(-) |  | ||||||
|  create mode 100644 roles/ipabackup/library/ipabackup_get_backup_dir.py |  | ||||||
| 
 |  | ||||||
| diff --git a/roles/ipabackup/library/ipabackup_get_backup_dir.py b/roles/ipabackup/library/ipabackup_get_backup_dir.py
 |  | ||||||
| new file mode 100644 |  | ||||||
| index 0000000..b76d01d
 |  | ||||||
| --- /dev/null
 |  | ||||||
| +++ b/roles/ipabackup/library/ipabackup_get_backup_dir.py
 |  | ||||||
| @@ -0,0 +1,69 @@
 |  | ||||||
| +#!/usr/bin/python
 |  | ||||||
| +# -*- coding: utf-8 -*-
 |  | ||||||
| +
 |  | ||||||
| +# Authors:
 |  | ||||||
| +#   Thomas Woerner <twoerner@redhat.com>
 |  | ||||||
| +#
 |  | ||||||
| +# Copyright (C) 2021  Red Hat
 |  | ||||||
| +# see file 'COPYING' for use and warranty information
 |  | ||||||
| +#
 |  | ||||||
| +# This program is free software; you can redistribute it and/or modify
 |  | ||||||
| +# it under the terms of the GNU General Public License as published by
 |  | ||||||
| +# the Free Software Foundation, either version 3 of the License, or
 |  | ||||||
| +# (at your option) any later version.
 |  | ||||||
| +#
 |  | ||||||
| +# This program is distributed in the hope that it will be useful,
 |  | ||||||
| +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 |  | ||||||
| +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 |  | ||||||
| +# GNU General Public License for more details.
 |  | ||||||
| +#
 |  | ||||||
| +# You should have received a copy of the GNU General Public License
 |  | ||||||
| +# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 |  | ||||||
| +
 |  | ||||||
| +ANSIBLE_METADATA = {
 |  | ||||||
| +    'metadata_version': '1.0',
 |  | ||||||
| +    'supported_by': 'community',
 |  | ||||||
| +    'status': ['preview'],
 |  | ||||||
| +}
 |  | ||||||
| +
 |  | ||||||
| +DOCUMENTATION = '''
 |  | ||||||
| +---
 |  | ||||||
| +module: ipabackup_get_backup_dir
 |  | ||||||
| +short description:
 |  | ||||||
| +  Get IPA_BACKUP_DIR from ipaplatform
 |  | ||||||
| +description:
 |  | ||||||
| +  Get IPA_BACKUP_DIR from ipaplatform
 |  | ||||||
| +options:
 |  | ||||||
| +author:
 |  | ||||||
| +    - Thomas Woerner
 |  | ||||||
| +'''
 |  | ||||||
| +
 |  | ||||||
| +EXAMPLES = '''
 |  | ||||||
| +# Get IPA_BACKUP_DIR from ipaplatform
 |  | ||||||
| +- name: ipabackup_get_backup_dir:
 |  | ||||||
| +  register result
 |  | ||||||
| +'''
 |  | ||||||
| +
 |  | ||||||
| +RETURN = '''
 |  | ||||||
| +backup_dir:
 |  | ||||||
| +  description: IPA_BACKUP_DIR from ipaplatform
 |  | ||||||
| +  returned: always
 |  | ||||||
| +  type: str
 |  | ||||||
| +'''
 |  | ||||||
| +
 |  | ||||||
| +from ansible.module_utils.basic import AnsibleModule
 |  | ||||||
| +from ipaplatform.paths import paths
 |  | ||||||
| +
 |  | ||||||
| +
 |  | ||||||
| +def main():
 |  | ||||||
| +    module = AnsibleModule(
 |  | ||||||
| +        argument_spec=dict(),
 |  | ||||||
| +        supports_check_mode=True,
 |  | ||||||
| +    )
 |  | ||||||
| +
 |  | ||||||
| +    module.exit_json(changed=False,
 |  | ||||||
| +                     backup_dir=paths.IPA_BACKUP_DIR)
 |  | ||||||
| +
 |  | ||||||
| +
 |  | ||||||
| +if __name__ == '__main__':
 |  | ||||||
| +    main()
 |  | ||||||
| diff --git a/roles/ipabackup/tasks/get_ipabackup_dir.yml b/roles/ipabackup/tasks/get_ipabackup_dir.yml
 |  | ||||||
| index 45cb48a..a7cb29d 100644
 |  | ||||||
| --- a/roles/ipabackup/tasks/get_ipabackup_dir.yml
 |  | ||||||
| +++ b/roles/ipabackup/tasks/get_ipabackup_dir.yml
 |  | ||||||
| @@ -1,12 +1,8 @@
 |  | ||||||
|  --- |  | ||||||
| -- name: Get IPA_BACKUP_DIR dir from ipaplatform
 |  | ||||||
| -  command: "{{ ansible_python_interpreter | default('/usr/bin/python') }}"
 |  | ||||||
| -  args:
 |  | ||||||
| -    stdin: |
 |  | ||||||
| -      from ipaplatform.paths import paths
 |  | ||||||
| -      print(paths.IPA_BACKUP_DIR)
 |  | ||||||
| -  register: result_ipaplatform_backup_dir
 |  | ||||||
| +- name: Get IPA_BACKUP_DIR from ipaplatform
 |  | ||||||
| +  ipabackup_get_backup_dir:
 |  | ||||||
| +  register: result_ipabackup_get_backup_dir
 |  | ||||||
|   |  | ||||||
|  - name: Set IPA backup dir |  | ||||||
|    set_fact: |  | ||||||
| -    ipabackup_dir: "{{ result_ipaplatform_backup_dir.stdout_lines | first }}"
 |  | ||||||
| +    ipabackup_dir: "{{ result_ipabackup_get_backup_dir.backup_dir }}"
 |  | ||||||
| -- 
 |  | ||||||
| 2.31.1 |  | ||||||
| 
 |  | ||||||
| @ -7,12 +7,11 @@ | |||||||
| 
 | 
 | ||||||
| Summary: Roles and playbooks to deploy FreeIPA servers, replicas and clients | Summary: Roles and playbooks to deploy FreeIPA servers, replicas and clients | ||||||
| Name: ansible-freeipa | Name: ansible-freeipa | ||||||
| Version: 0.3.6 | Version: 0.3.8 | ||||||
| Release: 3%{?dist} | Release: 1%{?dist} | ||||||
| URL: https://github.com/freeipa/ansible-freeipa | URL: https://github.com/freeipa/ansible-freeipa | ||||||
| License: GPLv3+ | License: GPLv3+ | ||||||
| Source: https://github.com/freeipa/ansible-freeipa/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz | Source: https://github.com/freeipa/ansible-freeipa/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz | ||||||
| Patch1: ansible-freeipa-0.3.6-ipabackup-Use-module-to-get-IPA_BACKUP_DIR-from-ipap_rhbz#1969847.patch |  | ||||||
| BuildArch: noarch | BuildArch: noarch | ||||||
| 
 | 
 | ||||||
| %description | %description | ||||||
| @ -104,7 +103,6 @@ to get the needed requrements to run the tests. | |||||||
| %prep | %prep | ||||||
| %setup -q | %setup -q | ||||||
| # Do not create backup files with patches | # Do not create backup files with patches | ||||||
| %patch1 -p1 |  | ||||||
| 
 | 
 | ||||||
| # Fix python modules and module utils: | # Fix python modules and module utils: | ||||||
| # - Remove shebang | # - Remove shebang | ||||||
| @ -161,6 +159,18 @@ cp -rp tests %{buildroot}%{_datadir}/ansible-freeipa/ | |||||||
| %{_datadir}/ansible-freeipa/requirements-tests.txt | %{_datadir}/ansible-freeipa/requirements-tests.txt | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Jul 15 2021 Thomas Woerner <twoerner@redhat.com> - 0.3.8-1 | ||||||
|  | - Update to version 0.3.7 and 0.3.8 | ||||||
|  |   https://github.com/freeipa/ansible-freeipa/releases/tag/v0.3.7 | ||||||
|  |   https://github.com/freeipa/ansible-freeipa/releases/tag/v0.3.8 | ||||||
|  |   Related: RHBZ#1972178 | ||||||
|  | - automember: Verify condition keys | ||||||
|  |   Resolves: RHBZ#1981713 | ||||||
|  | - automember: Fix result["failed"] issues with conditions | ||||||
|  |   Resolves: RHBZ#1981713 | ||||||
|  | - automember: Fix action to be automember or member, not service | ||||||
|  |   Resolves: RHBZ#1981711 | ||||||
|  | 
 | ||||||
| * Thu Jun 17 2021 Thomas Woerner <twoerner@redhat.com> - 0.3.6-3 | * Thu Jun 17 2021 Thomas Woerner <twoerner@redhat.com> - 0.3.6-3 | ||||||
| - Apply fix for ipabackup: Use module to get IPA_BACKUP_DIR from ipaplatform | - Apply fix for ipabackup: Use module to get IPA_BACKUP_DIR from ipaplatform | ||||||
|   Resolves: RRBZ#1973173 |   Resolves: RRBZ#1973173 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								sources
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sources
									
									
									
									
									
								
							| @ -1 +1 @@ | |||||||
| SHA512 (ansible-freeipa-0.3.6.tar.gz) = 836b85883fa13f06f331d85f85bcf20e4d1bb9718e3a38d087195f2d40fc2d13346b25c4ab724bdb3ef676dc6542471ad9f0768ed5c9f8f2066db3697acb9c3d | SHA512 (ansible-freeipa-0.3.8.tar.gz) = 2bef7a2f69184583d352bb65f227a7a693afeebaa051eeadb2815c2658428bb225c9ad56545f79e28efaec47741f9b47dff8fcbb4997adda5326b55a123143de | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user