mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2025-12-14 18:44:53 +01:00
build
This commit is contained in:
@@ -15,7 +15,7 @@ parser = argparse.ArgumentParser(description="Portainer helper - use env vars or
|
||||
parser.add_argument("--base", "-b", default=os.getenv("PORTAINER_URL", "https://portainer.example.com"),
|
||||
help="Base URL for Portainer (ENV: PORTAINER_URL)")
|
||||
parser.add_argument("--site", "-t", type=str, default="portainer", help="Site")
|
||||
parser.add_argument("--endpoint-id", "-e", type=str, default="all", help="Endpoint ID to limit stack operations")
|
||||
parser.add_argument("--endpoint-id", "-e", type=str, default=None, help="Endpoint ID to limit stack operations")
|
||||
parser.add_argument("--refresh-environment", "-R", action="store_true", help="List endpoints")
|
||||
parser.add_argument("--list-endpoints","-E", action="store_true", help="List endpoints")
|
||||
parser.add_argument("--list-stacks", "-l", action="store_true", help="List stacks")
|
||||
@@ -106,10 +106,15 @@ if __name__ == "__main__":
|
||||
# Example: list endpoints
|
||||
por = Portainer(base, token)
|
||||
if args.secrets:
|
||||
if args.endpoint_id == None:
|
||||
args.endpoint_id = input("Endpoint ID is required for creating secrets : ")
|
||||
|
||||
secrets = {
|
||||
"gitea_runner_registration_token": "8nmKqJhkvYwltmNfF2o9vs0tzo70ufHSQpVg6ymb",
|
||||
"influxdb2-admin-token": "l4c1j4yd33Du5lo",
|
||||
"ha_influxdb2_admin_token": "l4c1j4yd33Du5lo",
|
||||
"wordpress_db_password": "wordpress",
|
||||
"wordpress_root_db_password": "wordpress"
|
||||
}
|
||||
for key, value in secrets.items():
|
||||
res = por.create_secret(key, value, args.endpoint_id, args.timeout)
|
||||
|
||||
Reference in New Issue
Block a user