From f74d504b53bbb996373e9fdc7d679ba6d84f1125 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Tue, 8 Feb 2022 16:28:17 +0100 Subject: [PATCH] Add roles argument_specs.yml --- .github/workflows/ci.yml | 2 +- roles/keycloak/meta/argument_specs.yml | 278 +++++++++++++++++++ roles/keycloak_realm/meta/argument_specs.yml | 88 ++++++ 3 files changed, 367 insertions(+), 1 deletion(-) create mode 100644 roles/keycloak/meta/argument_specs.yml create mode 100644 roles/keycloak_realm/meta/argument_specs.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 979ac8c..3a2de7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: run: | python -m pip install --upgrade pip pip install yamllint 'molecule[docker]~=3.5.2' ansible-core flake8 ansible-lint voluptuous - pip install -r ansible_collections/middleware_automation/keycloak/requirements.yml + pip install -r ansible_collections/middleware_automation/keycloak/requirements.txt - name: Create default collection path run: | diff --git a/roles/keycloak/meta/argument_specs.yml b/roles/keycloak/meta/argument_specs.yml new file mode 100644 index 0000000..2d4fa9c --- /dev/null +++ b/roles/keycloak/meta/argument_specs.yml @@ -0,0 +1,278 @@ +argument_specs: + main: + options: + keycloak_version: + # line 3 of keycloak/defaults/main.yml + default: "15.0.2" + description: "TODO document argument" + type: "str" + keycloak_archive: + # line 4 of keycloak/defaults/main.yml + default: "keycloak-{{ keycloak_version }}.zip" + description: "TODO document argument" + type: "str" + keycloak_download_url: + # line 5 of keycloak/defaults/main.yml + default: "https://github.com/keycloak/keycloak/releases/download/{{ keycloak_version }}/{{ keycloak_archive }}" + description: "TODO document argument" + type: "str" + keycloak_download_url_9x: + # line 6 of keycloak/defaults/main.yml + default: "https://downloads.jboss.org/keycloak/{{ keycloak_version }}/{{ keycloak_archive }}" + description: "TODO document argument" + type: "str" + keycloak_installdir: + # line 7 of keycloak/defaults/main.yml + default: "{{ keycloak_dest }}/keycloak-{{ keycloak_version }}" + description: "TODO document argument" + type: "str" + keycloak_rhsso_version: + # line 10 of keycloak/defaults/main.yml + default: "7.5.0" + description: "TODO document argument" + type: "str" + rhsso_rhn_id: + # line 11 of keycloak/defaults/main.yml + default: "{{ rhsso_rhn_ids[keycloak_rhsso_version] }}" + description: "TODO document argument" + type: "str" + keycloak_rhsso_archive: + # line 12 of keycloak/defaults/main.yml + default: "rh-sso-{{ keycloak_rhsso_version }}-server-dist.zip" + description: "TODO document argument" + type: "str" + keycloak_rhsso_installdir: + # line 13 of keycloak/defaults/main.yml + default: "{{ keycloak_dest }}/rh-sso-{{ keycloak_rhsso_version | regex_replace('^([0-9])\\.([0-9]*).*', '\\1.\\2') }}" + description: "TODO document argument" + type: "str" + keycloak_rhn_url: + # line 14 of keycloak/defaults/main.yml + default: "https://access.redhat.com/jbossnetwork/restricted/softwareDownload.html?softwareId=" + description: "TODO document argument" + type: "str" + keycloak_rhsso_download_url: + # line 15 of keycloak/defaults/main.yml + default: "{{ keycloak_rhn_url }}{{ rhsso_rhn_id }}" + description: "TODO document argument" + type: "str" + keycloak_rhsso_enable: + # line 18 of keycloak/defaults/main.yml + default: "{{ True if rhsso_rhn_id is defined and rhn_username is defined and rhn_password is defined else False }}" + description: "TODO document argument" + type: "str" + keycloak_offline_install: + # line 20 of keycloak/defaults/main.yml + default: false + description: "TODO document argument" + type: "bool" + jvm_package: + # line 23 of keycloak/defaults/main.yml + default: "java-1.8.0-openjdk-devel" + description: "TODO document argument" + type: "str" + keycloak_dest: + # line 24 of keycloak/defaults/main.yml + default: "/opt/keycloak" + description: "TODO document argument" + type: "str" + keycloak_jboss_home: + # line 25 of keycloak/defaults/main.yml + default: "{{ keycloak_rhsso_installdir if keycloak_rhsso_enable else keycloak_installdir }}" + description: "TODO document argument" + type: "str" + keycloak_config_dir: + # line 26 of keycloak/defaults/main.yml + default: "{{ keycloak_jboss_home }}/standalone/configuration" + description: "TODO document argument" + type: "str" + keycloak_config_standalone_xml: + # line 27 of keycloak/defaults/main.yml + default: "keycloak.xml" + description: "TODO document argument" + type: "str" + keycloak_config_path_to_standalone_xml: + # line 28 of keycloak/defaults/main.yml + default: "{{ keycloak_jboss_home }}/standalone/configuration/{{ keycloak_config_standalone_xml }}" + description: "TODO document argument" + type: "str" + keycloak_service_user: + # line 29 of keycloak/defaults/main.yml + default: "keycloak" + description: "TODO document argument" + type: "str" + keycloak_service_group: + # line 30 of keycloak/defaults/main.yml + default: "keycloak" + description: "TODO document argument" + type: "str" + keycloak_service_pidfile: + # line 31 of keycloak/defaults/main.yml + default: "/run/keycloak.pid" + description: "TODO document argument" + type: "str" + keycloak_bind_address: + # line 34 of keycloak/defaults/main.yml + default: "0.0.0.0" + description: "TODO document argument" + type: "str" + keycloak_host: + # line 35 of keycloak/defaults/main.yml + default: "localhost" + description: "TODO document argument" + type: "str" + keycloak_http_port: + # line 36 of keycloak/defaults/main.yml + default: 8080 + description: "TODO document argument" + type: "int" + keycloak_https_port: + # line 37 of keycloak/defaults/main.yml + default: 8443 + description: "TODO document argument" + type: "int" + keycloak_ajp_port: + # line 38 of keycloak/defaults/main.yml + default: 8009 + description: "TODO document argument" + type: "int" + keycloak_jgroups_port: + # line 39 of keycloak/defaults/main.yml + default: 7600 + description: "TODO document argument" + type: "int" + keycloak_management_http_port: + # line 40 of keycloak/defaults/main.yml + default: 9990 + description: "TODO document argument" + type: "int" + keycloak_management_https_port: + # line 41 of keycloak/defaults/main.yml + default: 9993 + description: "TODO document argument" + type: "int" + keycloak_java_opts: + # line 42 of keycloak/defaults/main.yml + default: "-Xms1024m -Xmx2048m" + description: "TODO document argument" + type: "str" + keycloak_prefer_ipv4: + # line 43 of keycloak/defaults/main.yml + default: true + description: "TODO document argument" + type: "bool" + keycloak_ha_enabled: + # line 46 of keycloak/defaults/main.yml + default: false + description: "TODO document argument" + type: "bool" + keycloak_db_enabled: + # line 48 of keycloak/defaults/main.yml + default: "{{ True if keycloak_ha_enabled else False }}" + description: "TODO document argument" + type: "str" + keycloak_admin_user: + # line 51 of keycloak/defaults/main.yml + default: "admin" + description: "TODO document argument" + type: "str" + keycloak_auth_realm: + # line 52 of keycloak/defaults/main.yml + default: "master" + description: "TODO document argument" + type: "str" + keycloak_auth_client: + # line 53 of keycloak/defaults/main.yml + default: "admin-cli" + description: "TODO document argument" + type: "str" + keycloak_force_install: + # line 55 of keycloak/defaults/main.yml + default: false + description: "TODO document argument" + type: "bool" + keycloak_modcluster_url: + # line 58 of keycloak/defaults/main.yml + default: "localhost" + description: "TODO document argument" + type: "str" + keycloak_frontend_url: + # line 59 of keycloak/defaults/main.yml + default: "http://localhost" + description: "TODO document argument" + type: "str" + infinispan_user: + # line 62 of keycloak/defaults/main.yml + default: "supervisor" + description: "TODO document argument" + type: "str" + infinispan_pass: + # line 63 of keycloak/defaults/main.yml + default: "supervisor" + description: "TODO document argument" + type: "str" + infinispan_url: + # line 64 of keycloak/defaults/main.yml + default: "localhost" + description: "TODO document argument" + type: "str" + infinispan_sasl_mechanism: + # line 65 of keycloak/defaults/main.yml + default: "SCRAM-SHA-512" + description: "TODO document argument" + type: "str" + infinispan_use_ssl: + # line 66 of keycloak/defaults/main.yml + default: false + description: "TODO document argument" + type: "bool" + infinispan_trust_store_path: + # line 68 of keycloak/defaults/main.yml + default: "/etc/pki/java/cacerts" + description: "TODO document argument" + type: "str" + infinispan_trust_store_password: + # line 69 of keycloak/defaults/main.yml + default: "changeit" + description: "TODO document argument" + type: "str" + keycloak_jdbc_engine: + # line 72 of keycloak/defaults/main.yml + default: "postgres" + description: "TODO document argument" + type: "str" + keycloak_db_user: + # line 74 of keycloak/defaults/main.yml + default: "keycloak-user" + description: "TODO document argument" + type: "str" + keycloak_db_pass: + # line 75 of keycloak/defaults/main.yml + default: "keycloak-pass" + description: "TODO document argument" + type: "str" + keycloak_jdbc_url: + # line 76 of keycloak/defaults/main.yml + default: "{{ keycloak_default_jdbc[keycloak_jdbc_engine].url }}" + description: "TODO document argument" + type: "str" + keycloak_jdbc_driver_version: + # line 77 of keycloak/defaults/main.yml + default: "{{ keycloak_default_jdbc[keycloak_jdbc_engine].version }}" + description: "TODO document argument" + type: "str" + keycloak_admin_password: + # line 4 of keycloak/vars/main.yml + required: true + description: "TODO document argument" + type: "str" + keycloak_url: + # line 12 of keycloak/vars/main.yml + default: "http://{{ keycloak_host }}:{{ keycloak_http_port }}" + description: "TODO document argument" + type: "str" + keycloak_management_url: + # line 13 of keycloak/vars/main.yml + default: "http://{{ keycloak_host }}:{{ keycloak_management_http_port }}" + description: "TODO document argument" + type: "str" diff --git a/roles/keycloak_realm/meta/argument_specs.yml b/roles/keycloak_realm/meta/argument_specs.yml new file mode 100644 index 0000000..bd9552e --- /dev/null +++ b/roles/keycloak_realm/meta/argument_specs.yml @@ -0,0 +1,88 @@ +argument_specs: + main: + options: + keycloak_host: + # line 3 of keycloak_realm/defaults/main.yml + default: "localhost" + description: "TODO document argument" + type: "str" + keycloak_http_port: + # line 4 of keycloak_realm/defaults/main.yml + default: 8080 + description: "TODO document argument" + type: "int" + keycloak_https_port: + # line 5 of keycloak_realm/defaults/main.yml + default: 8443 + description: "TODO document argument" + type: "int" + keycloak_admin_user: + # line 8 of keycloak_realm/defaults/main.yml + default: "admin" + description: "TODO document argument" + type: "str" + keycloak_auth_realm: + # line 9 of keycloak_realm/defaults/main.yml + default: "master" + description: "TODO document argument" + type: "str" + keycloak_auth_client: + # line 10 of keycloak_realm/defaults/main.yml + default: "admin-cli" + description: "TODO document argument" + type: "str" + keycloak_user_federation: + # line 13 of keycloak_realm/defaults/main.yml + default: "[]" + description: "TODO document argument" + type: "list" + keycloak_client_default_roles: + # line 36 of keycloak_realm/defaults/main.yml + default: "[]" + description: "TODO document argument" + type: "list" + keycloak_client_public: + # line 39 of keycloak_realm/defaults/main.yml + default: true + description: "TODO document argument" + type: "bool" + keycloak_client_web_origins: + # line 42 of keycloak_realm/defaults/main.yml + default: "+" + description: "TODO document argument" + type: "str" + keycloak_client_users: + # line 49 of keycloak_realm/defaults/main.yml + default: "[]" + description: "TODO document argument" + type: "list" + keycloak_admin_password: + # line 5 of keycloak_realm/vars/main.yml + required: true + description: "TODO document argument" + type: "str" + keycloak_realm: + # line 8 of keycloak_realm/vars/main.yml + required: true + description: "TODO document argument" + type: "str" + keycloak_clients: + # line 11 of keycloak_realm/vars/main.yml + required: true + description: "TODO document argument" + type: "str" + keycloak_url: + # line 14 of keycloak_realm/vars/main.yml + default: "http://{{ keycloak_host }}:{{ keycloak_http_port }}" + description: "TODO document argument" + type: "str" + keycloak_management_url: + # line 15 of keycloak_realm/vars/main.yml + default: "http://{{ keycloak_host }}:{{ keycloak_management_http_port }}" + description: "TODO document argument" + type: "str" + keycloak_rhsso_enable: + # line 16 of keycloak_realm/vars/main.yml + default: false + description: "TODO document argument" + type: "bool"