update src/ansible_gentooimgr

This commit is contained in:
emdee 2023-12-30 11:19:54 +00:00
parent 87c247eef2
commit cb32e7e66d
3 changed files with 15 additions and 8 deletions

View File

@ -1,6 +1,12 @@
GentooImgr: Gentoo Image Builder for Cloud and Turnkey ISO installers GentooImgr: Gentoo Image Builder for Cloud and Turnkey ISO installers
===================================================================== =====================================================================
** This is a modified version of https://github.com/NucleaPeon/gentooimgr/
where we've modified the code a little to do use Python logging. We can
still use it for the build stage, but we think the install stahe is better
done using ansible, hence the libvirt_cloud playbook.**
GentooImgr is a python script system to build cloud images based on Gentoo Linux. GentooImgr is a python script system to build cloud images based on Gentoo Linux.
Huge thanks to https://github.com/travisghansen/gentoo-cloud-image-builder for providing a foundation to work from. Huge thanks to https://github.com/travisghansen/gentoo-cloud-image-builder for providing a foundation to work from.

View File

@ -32,7 +32,6 @@
"postfix", "postfix",
"parted", "parted",
"portage-utils", "portage-utils",
"bash-completion",
"gentoo-bashcomp", "gentoo-bashcomp",
"tmux", "tmux",
"app-misc/screen", "app-misc/screen",

View File

@ -12,7 +12,9 @@ import traceback
sys.path.append('/mnt/o/var/local/src/play_tox/src/ansible_gentooimgr') sys.path.append('/mnt/o/var/local/src/play_tox/src/ansible_gentooimgr')
# in the library # in the library
mod_path = os.path.dirname(os.path.realpath('__file__')) if os.environ.get('TESTF_ANSIBLE_SRC',''):
# running from source
mod_path = os.environ.get('TESTF_ANSIBLE_SRC','')
mod_path = os.path.join(mod_path, 'src', 'ansible_gentooimgr') mod_path = os.path.join(mod_path, 'src', 'ansible_gentooimgr')
assert os.path.isdir(mod_path), f"parent {mod_path}" assert os.path.isdir(mod_path), f"parent {mod_path}"
assert os.path.isfile(os.path.join(mod_path, '__init__.py')),f"index {mod_path}" assert os.path.isfile(os.path.join(mod_path, '__init__.py')),f"index {mod_path}"
@ -21,7 +23,7 @@ sys.path.append(mod_path)
try: try:
import gentooimgr import gentooimgr
except Exception as e: except Exception as e:
sys.stderr.write(f"{mod_path} {sys.path} {traceback.print_exc()}") sys.stderr.write(f"{e} {sys.path} {traceback.print_exc()}")
raise raise
import ansible import ansible