The purpose of this new USES file is to provide a central place for
setting Ansible paths for modules and plugins. Perhaps in the future we
will extend to reduce boilerplate code in existing Ansible-related
ports.
PR: 255920
Reported by: lcook
Differential D30312
Add USES=ansible for Ansible ports 0mp on May 17 2021, 11:56 AM. Authored by Tags None Referenced Files
Details
The purpose of this new USES file is to provide a central place for PR: 255920
Diff Detail
Event TimelineComment Actions Note: I've thought about integrating a simple target as well, but I'm not sure if that's really helpful. Nevertheless, here's the testing part of the patch I skipped: ANSIBLE_TEST?= yes .if ${ANSIBLE_TEST:tl} != "no" . if ${ansible_ARGS} == "module" . if empty(ANSIBLE_MODULE) IGNORE= ANSIBLE_MODULE must be set . endif . elif ${ansible_ARGS} == "plugin" . if empty(ANSIBLE_PLUGIN) IGNORE= ANSIBLE_PLUGIN must be set . endif . endif TEST_ENV+= PAGER=cat .endif .if !target(do-test) && ${ANSIBLE_TEST:tl} != "no" . if ${ansible_ARGS} == "module" do-test: ${SETENV} ${TEST_ENV} ${ANSIBLE_CMD} \ --module-path ${STAGEDIR}${ANSIBLE_MODULESDIR} \ --module-name ${ANSIBLE_MODULE} \ --syntax-check \ localhost . elif ${ansible_ARGS} == "plugin" do-test: ${SETENV} ${TEST_ENV} ${ANSIBLE_DOC_CMD} \ --module-path ${STAGEDIR}${ANSIBLE_PLUGINSDIR} \ --type ${ANSIBLE_PLUGIN_TYPE} \ ${ANSIBLE_PLUGIN} | ${GREP} -q . . endif .endif Comment Actions I think this is fine. It would simplify module/plugin ports and move some common code where it belongs. A test target can be added later anyway.
|