diff --git a/sysutils/ansible/Makefile b/sysutils/ansible/Makefile index e8c42d3d13eb..71c25555a423 100644 --- a/sysutils/ansible/Makefile +++ b/sysutils/ansible/Makefile @@ -1,46 +1,47 @@ PORTNAME= ansible DISTVERSION= 13.5.0 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= cy@FreeBSD.org COMMENT= Radically simple IT automation WWW= https://www.ansible.com/ LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ansible-core>0:sysutils/py-ansible-core@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}importlib-resources>0:devel/py-importlib-resources@${PY_FLAVOR} USES= ansible:env cpe python shebangfix CPE_VENDOR= redhat USE_PYTHON= autoplist concurrent distutils SHEBANG_FILES= ansible_collections/ovirt/ovirt/roles/disaster_recovery/files/ovirt-dr # It's probably best to leave shebangs in modules untouched as they must be # either unversioned or absent. # See [1] and [2]. # [1]: https://github.com/ansible/ansible/issues/78243 # [2]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265211 SHEBANG_REGEX= (([^/])|(/[^m])|(/m[^o])|(/mo[^d])|(/mod[^u])|(/modu[^l])|(/modul[^e])|(/module[^s])|(/modules[^/]))*\.(py|sh|build.py.generic) python_OLD_CMD= /Users/kbreit/Documents/Programming/ansible_collections/cisco/meraki/venv/bin/python NO_ARCH= yes DO_MAKE_TEST= env LC_ALL=C.UTF-8 ansible -m ping TEST_TARGET= localhost post-patch: ${FIND} ${WRKSRC} -type f -exec ${GREP} --null -El '(/etc/ansible|/usr/share/ansible)' {} + | ${XARGS} -n 500 -0 ${REINPLACE_CMD} \ -e 's|/etc/ansible|${ETCDIR}|g' \ -e 's|/usr/share/ansible|${DATADIR}|g' ${FIND} ${WRKSRC} -type f -name "*.bak" -delete .include # Make sure that we override the unique DATADIR and ETCDIR set # by the implicit USES=uniquefiles. DATADIR= ${ANSIBLE_DATADIR} ETCDIR= ${ANSIBLE_ETCDIR} diff --git a/sysutils/ansible/files/patch-ansible__collections_ansible_posix_plugins_modules_firewalld_info.py b/sysutils/ansible/files/patch-ansible__collections_ansible_posix_plugins_modules_firewalld_info.py new file mode 100644 index 000000000000..3bb8127dd3b9 --- /dev/null +++ b/sysutils/ansible/files/patch-ansible__collections_ansible_posix_plugins_modules_firewalld_info.py @@ -0,0 +1,12 @@ +diff --git ansible_collections/ansible/posix/plugins/modules/firewalld_info.py ansible_collections/ansible/posix/plugins/modules/firewalld_info.py +index c34a362..0da6dd3 100644 +--- ansible_collections/ansible/posix/plugins/modules/firewalld_info.py ++++ ansible_collections/ansible/posix/plugins/modules/firewalld_info.py +@@ -319,7 +319,6 @@ def main(): + active_zones=module.params['active_zones'], + collected_zones=list(), + undefined_zones=list(), +- warnings=list(), + ) + + # Exit with failure message if requirements modules are not installed. diff --git a/sysutils/ansible/files/patch-ansible__collections_ansible_posix_plugins_modules_mount.py b/sysutils/ansible/files/patch-ansible__collections_ansible_posix_plugins_modules_mount.py new file mode 100644 index 000000000000..56f97df8a439 --- /dev/null +++ b/sysutils/ansible/files/patch-ansible__collections_ansible_posix_plugins_modules_mount.py @@ -0,0 +1,48 @@ +diff --git ansible_collections/ansible/posix/plugins/modules/mount.py ansible_collections/ansible/posix/plugins/modules/mount.py +index b9e496e..6e2425b 100644 +--- ansible_collections/ansible/posix/plugins/modules/mount.py ++++ ansible_collections/ansible/posix/plugins/modules/mount.py +@@ -279,7 +279,7 @@ def _set_mount_save_old(module, args): + old_lines = [] + exists = False + changed = False +- escaped_args = dict([(k, _escape_fstab(v)) for k, v in iteritems(args) if k != 'warnings']) ++ escaped_args = dict([(k, _escape_fstab(v)) for k, v in iteritems(args)]) + new_line = '%(src)s %(name)s %(fstype)s %(opts)s %(dump)s %(passno)s\n' + + if platform.system() == 'SunOS': +@@ -804,7 +804,6 @@ def main(): + passno='-', + fstab=module.params['fstab'], + boot='yes' if module.params['boot'] else 'no', +- warnings=[] + ) + if args['fstab'] is None: + args['fstab'] = '/etc/vfstab' +@@ -816,7 +815,6 @@ def main(): + passno='0', + fstab=module.params['fstab'], + boot='yes', +- warnings=[] + ) + if args['fstab'] is None: + args['fstab'] = '/etc/fstab' +@@ -834,8 +832,7 @@ def main(): + linux_mounts = get_linux_mounts(module) + + if linux_mounts is None: +- args['warnings'].append('Cannot open file /proc/self/mountinfo.' +- ' Bind mounts might be misinterpreted.') ++ module.warn('Cannot open file /proc/self/mountinfo. Bind mounts might be misinterpreted.') + + # Override defaults with user specified params + for key in ('src', 'fstype', 'passno', 'opts', 'dump', 'fstab'): +@@ -847,7 +844,7 @@ def main(): + # specified in 'opts', mount module will ignore 'boot'. + opts = args['opts'].split(',') + if module.params['boot'] and 'noauto' in opts: +- args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.") ++ module.warn("Ignore the 'boot' due to 'opts' contains 'noauto'.") + elif not module.params['boot']: + args['boot'] = 'no' + opts.append('noauto')