sysutils/ansible-iocage: create port

Ansible module for the iocage utility: convenient, lightweight
and easy jail management.

WWW: https://github.com/fractalcells/ansible-iocage

PR:		240814
Submitted by:	Lewis Cook <vulcan@wired.sh>
This commit is contained in:
Steve Wills 2020-09-02 14:29:43 +00:00
parent 2b6955e025
commit 8ba5fc7600
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=547359
5 changed files with 71 additions and 0 deletions

View File

@ -40,6 +40,7 @@
SUBDIR += android-file-transfer-qt5
SUBDIR += angrysearch
SUBDIR += ansible
SUBDIR += ansible-iocage
SUBDIR += ansible-kld
SUBDIR += ansible-sysrc
SUBDIR += ansible27

View File

@ -0,0 +1,36 @@
# $FreeBSD$
PORTNAME= ansible-iocage
DISTVERSION= 0.1
CATEGORIES= sysutils
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= vulcan@wired.sh
COMMENT= Ansible module for iocage
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ansible>0:sysutils/ansible@${PY_FLAVOR}
USES= python shebangfix
SHEBANG_FILES= iocage
USE_GITHUB= yes
GH_ACCOUNT= fractalcells
GH_PROJECT= ansible-iocage
GH_TAGNAME= b8114ae6670fefddf0612801fd16030595c24bb2
NO_ARCH= yes
NO_BUILD= yes
ANSIBLE_MOD= share/${PYTHON_PKGNAMEPREFIX}ansible/plugins/modules
PLIST_FILES= ${ANSIBLE_MOD}/iocage
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${ANSIBLE_MOD}
${INSTALL_SCRIPT} ${WRKSRC}/iocage \
${STAGEDIR}${PREFIX}/${ANSIBLE_MOD}/iocage
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1569417146
SHA256 (fractalcells-ansible-iocage-0.1-b8114ae6670fefddf0612801fd16030595c24bb2_GH0.tar.gz) = 422e32f7cf34266a5b2ba1722d4e316aab2581a0a0087cb844a976f81bed86fd
SIZE (fractalcells-ansible-iocage-0.1-b8114ae6670fefddf0612801fd16030595c24bb2_GH0.tar.gz) = 7786

View File

@ -0,0 +1,27 @@
See: https://github.com/fractalcells/ansible-iocage/pull/18
--- iocage.orig 2019-11-03 14:19:54 UTC
+++ iocage
@@ -148,10 +148,11 @@ def _get_iocage_facts(module, iocage_path, argument="a
# non-iocage jails: skip all
break
elif re.match('(\d+|-)',_jid):
- if l.count('\t') == 10:
- (_jid,_name,_boot,_state,_type,_release,_ip4,_ip6,_template,_basejail) = l.split('\t')
+ _fragments = l.split('\t')
+ if len(_fragments) == 10:
+ (_jid,_name,_boot,_state,_type,_release,_ip4,_ip6,_template,_basejail) = _fragments
else:
- (_jid,_name,_boot,_state,_type,_release,_ip4,_ip6,_template) = l.split('\t')
+ (_jid,_name,_boot,_state,_type,_release,_ip4,_ip6,_template) = _fragments
if _name != "":
_properties = _jail_get_properties(module, iocage_path, _name)
_jails[_name] = { "jid": _jid, "name": _name, "state": _state, "properties": _properties }
@@ -504,7 +505,7 @@ def main():
cmd = dict(default="", required=False),
clone_from = dict(default="", required=False),
release = dict(default="", required=False),
- update = dict(default="", required=False, type='bool'),
+ update = dict(default=False, required=False, type='bool'),
components = dict(default="", aliases=["files","component"], required=False, type='list')),
supports_check_mode = True
)

View File

@ -0,0 +1,4 @@
Ansible module for the iocage utility: convenient, lightweight
and easy jail management.
WWW: https://github.com/fractalcells/ansible-iocage