-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb1c29f
commit 26e19ee
Showing
13 changed files
with
80 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,28 @@ | ||
import click | ||
import cli.ldap.add_roles_to_username, cli.ldap.rbac | ||
from cli import ldap | ||
|
||
from cli import git | ||
import cli.env | ||
|
||
|
||
@click.group() | ||
def main_group(): | ||
pass | ||
|
||
|
||
@click.command() | ||
@click.option("--user-ou", help="OU to add users to, defaults to ou=Users", default="ou=Users") | ||
@click.option("--root-dn", help="Root DN to add users to", default="dc=moj,dc=com") | ||
@click.argument("user-role-list", required=True) | ||
def add_roles_to_users(user_ou, root_dn, user_role_list): | ||
cli.ldap.add_roles_to_username.process_user_roles_list(user_role_list, user_ou, root_dn) | ||
ldap.process_user_roles_list(user_role_list, user_ou, root_dn) | ||
|
||
|
||
@click.command() | ||
@click.option("--rbac-repo-tag", help="RBAC repo tag to use", default="master") | ||
def rbac_uplift(rbac_repo_tag): | ||
cli.ldap.rbac.main(rbac_repo_tag) | ||
|
||
def git_test(): | ||
git.dl_test() | ||
|
||
# from cli.ldap import test | ||
|
||
main_group.add_command(add_roles_to_users) | ||
main_group.add_command(rbac_uplift) | ||
main_group.add_command(git_test) | ||
|
||
if __name__ == "__main__": | ||
main_group() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import ansible_runner | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
ldap_host = os.getenv("LDAP_HOST") | ||
ldap_user = os.getenv("LDAP_USER") | ||
ldap_password = os.getenv("LDAP_PASSWORD") | ||
db_user = os.getenv("DB_USER") | ||
db_password = os.getenv("DB_PASSWORD") | ||
db_host = os.getenv("DB_HOST") | ||
db_port = os.getenv("DB_PORT") | ||
db_service_name = os.getenv("DB_SERVICE_NAME") | ||
gh_app_id = os.getenv("GH_APP_ID") | ||
gh_private_key = os.getenv("GH_PRIVATE_KEY") | ||
gh_installation_id = os.getenv("GH_INSTALLATION_ID") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.