diff --git a/whereami.py b/whereami.py index 2418885..f05f060 100644 --- a/whereami.py +++ b/whereami.py @@ -2,8 +2,25 @@ Library of path constants to be used or referenced elsewhere. """ -from custtypes import ExecutedPath +from custtypes import ExecutedPath, Roles, Scopes, AnsibleScopes from pathlib import Path USER_PATH: ExecutedPath = Path.home() -PROJ_ROOT: ExecutedPath = Path(__file__).parent.resolve() \ No newline at end of file +PROJ_ROOT: ExecutedPath = Path(__file__).parent.resolve() +PROJ_ROLES: ExecutedPath = PROJ_ROOT / "roles" + +APP_ROOTS = { + Roles.CONF.name.lower(): { + Scopes.SYS.name.lower(): Path("/etc"), + Scopes.USER.name.lower(): USER_PATH / ".config", + Scopes.SHARED.name.lower(): Path("/usr/share"), + Scopes.PROJ.name.lower(): tuple(list(PROJ_ROLES.glob("**/files")) + list(PROJ_ROLES.glob("**/templates"))) + } +} + +ANSIBLE_ROOTS = { + AnsibleScopes.GROUPVARS.name.lower(): PROJ_ROOT / "group_vars", + AnsibleScopes.HOSTVARS.name.lower(): PROJ_ROOT / "host_vars", + AnsibleScopes.INVENTORY.name.lower(): None, + AnsibleScopes.ROLE.name.lower(): None +} \ No newline at end of file