From 00f87bb4f7adb8da6bcd93ff43f4570ef9dc8e2f Mon Sep 17 00:00:00 2001 From: mrjk Date: Mon, 14 Feb 2022 15:34:28 -0500 Subject: [PATCH] Update: Jupyter playbook --- docs/jupyter/learn101.ipynb | 492 +++++++++++++++++++----------------- 1 file changed, 255 insertions(+), 237 deletions(-) diff --git a/docs/jupyter/learn101.ipynb b/docs/jupyter/learn101.ipynb index e3354e0..4f9e5e7 100644 --- a/docs/jupyter/learn101.ipynb +++ b/docs/jupyter/learn101.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "id": "98d4907b", "metadata": {}, "outputs": [ @@ -18,12 +18,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "/home/jez/volumes/data/prj/bell/training/tiger-ansible/ext/kheops\n" + "/home/jez/prj/bell/dev/kheops\n" ] } ], "source": [ - "cd /home/jez/volumes/data/prj/bell/training/tiger-ansible/ext/kheops\n", + "cd ${KHEOPS_EXAMPLES_DIR:-/dev/null}\n", "echo $PWD\n", "export KHEOPS_NAMESPACE=ex1_enc \n", "export KHEOPS_CONFIG=examples/kheops.yml\n", @@ -48,7 +48,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "id": "6ede46a3", "metadata": {}, "outputs": [ @@ -56,22 +56,24 @@ "name": "stdout", "output_type": "stream", "text": [ - "usage: kheops [-h] [-v] [-c CONFIG]\n", - " {schema,gen_doc,lookup,demo,subcommand2} ...\n", + "Usage: kheops [OPTIONS] COMMAND [ARGS]...\n", "\n", - "Kheops, hierarchical data lookup tool\n", + " Khéops, hierarchical key/value store\n", "\n", - "options:\n", - " -h, --help show this help message and exit\n", - " -v, --verbose Increase verbosity (KHEOPS_VERBOSE) (default: 0)\n", - " -c CONFIG, --config CONFIG\n", - " Kheops configuration file (KHEOPS_CONFIG) (default:\n", - " examples/kheops.yml)\n", + "Options:\n", + " -v, --verbose [default: 0]\n", + " -c PATH Last name of person to greet. [env var:\n", + " KHEOPS_CONFIG; default: kheops.yml]\n", + " --install-completion [bash|zsh|fish|powershell|pwsh]\n", + " Install completion for the specified shell.\n", + " --show-completion [bash|zsh|fish|powershell|pwsh]\n", + " Show completion for the specified shell, to\n", + " copy it or customize the installation.\n", + " --help Show this message and exit.\n", "\n", - "subcommands:\n", - " valid subcommands\n", - "\n", - " {schema,gen_doc,lookup,demo,subcommand2}\n" + "Commands:\n", + " config\n", + " lookup Lookup database\n" ] } ], @@ -149,14 +151,6 @@ "A scope is completely optional while keys are required." ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "9e6aae44", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "id": "d509fa19", @@ -165,9 +159,35 @@ "## Basic hierarchy" ] }, + { + "cell_type": "markdown", + "id": "8dd5b6b9", + "metadata": {}, + "source": [ + "Let's create a firest hierachy, we will define a first basic hierarchy. In `kheops.yml`, we can find:\n", + "\n", + "```\n", + "ex1_enc:\n", + " \n", + " config:\n", + " file_path_prefix: \"ex1_enc/\"\n", + " file_path_suffix: \"/ansible\"\n", + "\n", + " lookups:\n", + "\n", + " - path: default # Simplest form, just a path\n", + " - path: \"roles/{role}\" # If list, it's auto expanded like in bash\n", + " - path: \"env_{env}\" # If list, it's auto expanded like in bash\n", + " - path: \"nodes/{node}\"\n", + "\n", + "```\n", + "\n", + "Now we have our hierachy, let's create our files:" + ] + }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 9, "id": "e510a46d", "metadata": {}, "outputs": [ @@ -175,7 +195,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[01;34mexamples/ex1_enc\u001b[00m\n", + "\u001b[01;34mexamples/ex1_enc\u001b[0m\n", "└── default.yml\n", "\n", "0 directories, 1 file\n", @@ -217,7 +237,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 8, "id": "06d85b1c", "metadata": {}, "outputs": [ @@ -225,8 +245,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: NO_ENV\n", - "product: NO_PRODUCT\n", + "profile:\n", + " env: NO_ENV\n", + " product: NO_PRODUCT\n", "\n" ] } @@ -245,7 +266,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 10, "id": "c5fad63b", "metadata": {}, "outputs": [ @@ -253,8 +274,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: NO_ENV\n", - "product: NO_PRODUCT\n", + "profile:\n", + " env: NO_ENV\n", + " product: NO_PRODUCT\n", "\n" ] } @@ -263,6 +285,14 @@ "kheops lookup -e node=web.infra.net profile" ] }, + { + "cell_type": "markdown", + "id": "a0649351", + "metadata": {}, + "source": [ + "Same result, let's check how we can change this behavior." + ] + }, { "cell_type": "markdown", "id": "53c43757", @@ -281,7 +311,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 11, "id": "9f5aabaa", "metadata": {}, "outputs": [ @@ -289,9 +319,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[01;34mexamples/ex1_enc\u001b[00m\n", + "\u001b[01;34mexamples/ex1_enc\u001b[0m\n", "├── default.yml\n", - "└── \u001b[01;34mroles\u001b[00m\n", + "└── \u001b[01;34mroles\u001b[0m\n", " ├── mysql.yml\n", " └── web.yml\n", "\n", @@ -336,7 +366,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 12, "id": "4762fa0c", "metadata": {}, "outputs": [ @@ -383,7 +413,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 13, "id": "0294ec50", "metadata": {}, "outputs": [ @@ -391,21 +421,23 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: NO_ENV\n", - "product: httpd_server\n", - "web_top_domain: ''\n", - "web_app: NO_APP\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", + "profile:\n", + " env: NO_ENV\n", + " product: httpd_server\n", + " web_top_domain: ''\n", + " web_app: NO_APP\n", + " web_port: 80\n", + " web_user_list:\n", + " - sysadmins\n", "\n", - "env: NO_ENV\n", - "product: mysql_server\n", - "mysql_database: NO_DATABASE\n", - "mysql_users:\n", - "- sysadmin@10.0.42%\n", - "mysql_port: 3306\n", - "mysql_cluster: false\n", + "profile:\n", + " env: NO_ENV\n", + " product: mysql_server\n", + " mysql_database: NO_DATABASE\n", + " mysql_users:\n", + " - sysadmin@10.0.42%\n", + " mysql_port: 3306\n", + " mysql_cluster: false\n", "\n" ] } @@ -436,7 +468,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 14, "id": "c1acb199", "metadata": {}, "outputs": [ @@ -444,12 +476,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[01;34mexamples/ex1_enc\u001b[00m\n", + "\u001b[01;34mexamples/ex1_enc\u001b[0m\n", "├── default.yml\n", - "├── \u001b[01;34mnodes\u001b[00m\n", + "├── \u001b[01;34mnodes\u001b[0m\n", "│   ├── mysql.infra.net.yml\n", "│   └── web.infra.net.yml\n", - "└── \u001b[01;34mroles\u001b[00m\n", + "└── \u001b[01;34mroles\u001b[0m\n", " ├── mysql.yml\n", " └── web.yml\n", "\n", @@ -495,7 +527,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 15, "id": "b0d34416", "metadata": {}, "outputs": [ @@ -503,24 +535,24 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: NO_ENV\n", - "product: httpd_server\n", - "web_top_domain: ''\n", - "web_app: myapp\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", - "- domain_org\n", - "- domain_org_external\n", + "profile:\n", + " env: NO_ENV\n", + " product: httpd_server\n", + " web_top_domain: ''\n", + " web_app: myapp\n", + " web_port: 80\n", + " web_user_list:\n", + " - domain_org\n", + " - domain_org_external\n", "\n", - "env: NO_ENV\n", - "product: mysql_server\n", - "mysql_database: app_domain_org\n", - "mysql_users:\n", - "- sysadmin@10.0.42%\n", - "- app_domain_org@10.0.51%\n", - "mysql_port: 3306\n", - "mysql_cluster: false\n", + "profile:\n", + " env: NO_ENV\n", + " product: mysql_server\n", + " mysql_database: app_domain_org\n", + " mysql_users:\n", + " - app_domain_org@10.0.51%\n", + " mysql_port: 3306\n", + " mysql_cluster: false\n", "\n" ] } @@ -548,7 +580,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 16, "id": "6c92b0cc", "metadata": {}, "outputs": [ @@ -556,14 +588,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[01;34mexamples/ex1_enc\u001b[00m\n", + "\u001b[01;34mexamples/ex1_enc\u001b[0m\n", "├── default.yml\n", "├── env_dev.yml\n", "├── env_prod.yml\n", - "├── \u001b[01;34mnodes\u001b[00m\n", + "├── \u001b[01;34mnodes\u001b[0m\n", "│   ├── mysql.infra.net.yml\n", "│   └── web.infra.net.yml\n", - "└── \u001b[01;34mroles\u001b[00m\n", + "└── \u001b[01;34mroles\u001b[0m\n", " ├── mysql.yml\n", " └── web.yml\n", "\n", @@ -619,7 +651,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 17, "id": "9c3200b4", "metadata": {}, "outputs": [ @@ -627,31 +659,30 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: prod\n", - "product: httpd_server\n", - "web_top_domain: infra.com\n", - "web_app: myapp\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", - "- domain_org\n", - "- domain_org_external\n", - "web_cache: 12h\n", + "profile:\n", + " env: prod\n", + " product: httpd_server\n", + " web_top_domain: infra.com\n", + " web_app: myapp\n", + " web_port: 80\n", + " web_user_list:\n", + " - domain_org\n", + " - domain_org_external\n", + " web_cache: 12h\n", "\n", - "env: dev\n", - "product: httpd_server\n", - "web_top_domain: dev.infra.net\n", - "web_app: myapp\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", - "- debug_user\n", - "- domain_org\n", - "- domain_org_external\n", - "web_cache: 1m\n", - "mysql_users:\n", - "- debug@10.0.%\n", - "debug: true\n", + "profile:\n", + " env: dev\n", + " product: httpd_server\n", + " web_top_domain: dev.infra.net\n", + " web_app: myapp\n", + " web_port: 80\n", + " web_user_list:\n", + " - domain_org\n", + " - domain_org_external\n", + " web_cache: 1m\n", + " mysql_users:\n", + " - debug@10.0.%\n", + " debug: true\n", "\n" ] } @@ -671,7 +702,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 18, "id": "7c5e86f3", "metadata": {}, "outputs": [ @@ -679,31 +710,30 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: prod\n", - "product: mysql_server\n", - "mysql_database: app_domain_org\n", - "mysql_users:\n", - "- sysadmin@10.0.42%\n", - "- app_domain_org@10.0.51%\n", - "mysql_port: 3306\n", - "mysql_cluster: false\n", - "web_top_domain: infra.com\n", - "web_cache: 12h\n", + "profile:\n", + " env: prod\n", + " product: mysql_server\n", + " mysql_database: app_domain_org\n", + " mysql_users:\n", + " - app_domain_org@10.0.51%\n", + " mysql_port: 3306\n", + " mysql_cluster: false\n", + " web_top_domain: infra.com\n", + " web_cache: 12h\n", "\n", - "env: dev\n", - "product: mysql_server\n", - "mysql_database: app_domain_org\n", - "mysql_users:\n", - "- sysadmin@10.0.42%\n", - "- debug@10.0.%\n", - "- app_domain_org@10.0.51%\n", - "mysql_port: 3306\n", - "mysql_cluster: false\n", - "web_top_domain: dev.infra.net\n", - "web_cache: 1m\n", - "web_user_list:\n", - "- debug_user\n", - "debug: true\n", + "profile:\n", + " env: dev\n", + " product: mysql_server\n", + " mysql_database: app_domain_org\n", + " mysql_users:\n", + " - app_domain_org@10.0.51%\n", + " mysql_port: 3306\n", + " mysql_cluster: false\n", + " web_top_domain: dev.infra.net\n", + " web_cache: 1m\n", + " web_user_list:\n", + " - debug_user\n", + " debug: true\n", "\n" ] } @@ -713,22 +743,6 @@ "kheops lookup -e node=mysql.infra.net -e role=mysql -e env=dev profile" ] }, - { - "cell_type": "markdown", - "id": "db50e110", - "metadata": {}, - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c2c4658d", - "metadata": {}, - "outputs": [], - "source": [ - "\n" - ] - }, { "cell_type": "markdown", "id": "e4bf6d8d", @@ -739,7 +753,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 19, "id": "103cb37d", "metadata": {}, "outputs": [ @@ -747,60 +761,64 @@ "name": "stdout", "output_type": "stream", "text": [ - "env: NO_ENV\n", - "product: NO_PRODUCT\n", + "profile:\n", + " env: NO_ENV\n", + " product: NO_PRODUCT\n", "\n", "==> Per environment view\n", - "env: prod\n", - "product: NO_PRODUCT\n", - "web_top_domain: infra.com\n", - "web_cache: 12h\n", + "profile:\n", + " env: prod\n", + " product: NO_PRODUCT\n", + " web_top_domain: infra.com\n", + " web_cache: 12h\n", "\n", - "env: dev\n", - "product: NO_PRODUCT\n", - "web_top_domain: dev.infra.net\n", - "web_cache: 1m\n", - "web_user_list:\n", - "- debug_user\n", - "mysql_users:\n", - "- debug@10.0.%\n", - "debug: true\n", + "profile:\n", + " env: dev\n", + " product: NO_PRODUCT\n", + " web_top_domain: dev.infra.net\n", + " web_cache: 1m\n", + " web_user_list:\n", + " - debug_user\n", + " mysql_users:\n", + " - debug@10.0.%\n", + " debug: true\n", "\n", "==> Per role and environment view\n", - "env: prod\n", - "product: mysql_server\n", - "mysql_database: NO_DATABASE\n", - "mysql_users:\n", - "- sysadmin@10.0.42%\n", - "mysql_port: 3306\n", - "mysql_cluster: false\n", - "web_top_domain: infra.com\n", - "web_cache: 12h\n", + "profile:\n", + " env: prod\n", + " product: mysql_server\n", + " mysql_database: NO_DATABASE\n", + " mysql_users:\n", + " - sysadmin@10.0.42%\n", + " mysql_port: 3306\n", + " mysql_cluster: false\n", + " web_top_domain: infra.com\n", + " web_cache: 12h\n", "\n", - "env: prod\n", - "product: httpd_server\n", - "web_top_domain: infra.com\n", - "web_app: NO_APP\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", - "web_cache: 12h\n", + "profile:\n", + " env: prod\n", + " product: httpd_server\n", + " web_top_domain: infra.com\n", + " web_app: NO_APP\n", + " web_port: 80\n", + " web_user_list:\n", + " - sysadmins\n", + " web_cache: 12h\n", "\n", "==> Per node view\n", - "env: dev\n", - "product: httpd_server\n", - "web_top_domain: dev.infra.net\n", - "web_app: myapp\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", - "- debug_user\n", - "- domain_org\n", - "- domain_org_external\n", - "web_cache: 1m\n", - "mysql_users:\n", - "- debug@10.0.%\n", - "debug: true\n", + "profile:\n", + " env: dev\n", + " product: httpd_server\n", + " web_top_domain: dev.infra.net\n", + " web_app: myapp\n", + " web_port: 80\n", + " web_user_list:\n", + " - domain_org\n", + " - domain_org_external\n", + " web_cache: 1m\n", + " mysql_users:\n", + " - debug@10.0.%\n", + " debug: true\n", "\n" ] } @@ -902,7 +920,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 21, "id": "52f5033b", "metadata": {}, "outputs": [ @@ -911,6 +929,7 @@ "output_type": "stream", "text": [ "+ : Find where a key has been defined\n", + "+ : ==========================\n", "+ grep --colour=auto -r '^profile:' examples/ex1_enc\n", "\u001b[35m\u001b[Kexamples/ex1_enc/env_prod.yml\u001b[m\u001b[K\u001b[36m\u001b[K:\u001b[m\u001b[K\u001b[01;31m\u001b[Kprofile:\u001b[m\u001b[K\n", "\u001b[35m\u001b[Kexamples/ex1_enc/roles/mysql.yml\u001b[m\u001b[K\u001b[36m\u001b[K:\u001b[m\u001b[K\u001b[01;31m\u001b[Kprofile:\u001b[m\u001b[K\n", @@ -920,6 +939,7 @@ "\u001b[35m\u001b[Kexamples/ex1_enc/default.yml\u001b[m\u001b[K\u001b[36m\u001b[K:\u001b[m\u001b[K\u001b[01;31m\u001b[Kprofile:\u001b[m\u001b[K\n", "\u001b[35m\u001b[Kexamples/ex1_enc/env_dev.yml\u001b[m\u001b[K\u001b[36m\u001b[K:\u001b[m\u001b[K\u001b[01;31m\u001b[Kprofile:\u001b[m\u001b[K\n", "+ : Find where a key has been defined and 5 first lines\n", + "+ : ==========================\n", "+ grep --colour=auto -r -A 5 web_user_list: examples/ex1_enc\n", "\u001b[35m\u001b[Kexamples/ex1_enc/roles/web.yml\u001b[m\u001b[K\u001b[36m\u001b[K:\u001b[m\u001b[K \u001b[01;31m\u001b[Kweb_user_list:\u001b[m\u001b[K\n", "\u001b[35m\u001b[Kexamples/ex1_enc/roles/web.yml\u001b[m\u001b[K\u001b[36m\u001b[K-\u001b[m\u001b[K - sysadmins\n", @@ -937,6 +957,7 @@ "\u001b[35m\u001b[Kexamples/ex1_enc/env_dev.yml\u001b[m\u001b[K\u001b[36m\u001b[K-\u001b[m\u001b[K\n", "\u001b[35m\u001b[Kexamples/ex1_enc/env_dev.yml\u001b[m\u001b[K\u001b[36m\u001b[K-\u001b[m\u001b[K debug: true\n", "+ : Search from anything related to database\n", + "+ : ==========================\n", "+ grep --colour=auto -R -C 3 database examples/ex1_enc\n", "\u001b[35m\u001b[Kexamples/ex1_enc/roles/mysql.yml\u001b[m\u001b[K\u001b[36m\u001b[K-\u001b[m\u001b[Kprofile:\n", "\u001b[35m\u001b[Kexamples/ex1_enc/roles/mysql.yml\u001b[m\u001b[K\u001b[36m\u001b[K-\u001b[m\u001b[K product: \"mysql_server\"\n", @@ -960,12 +981,17 @@ "set -x\n", "\n", ": Find where a key has been defined\n", + ": ==========================\n", "grep -r '^profile:' examples/$KHEOPS_NAMESPACE\n", "\n", + "\n", ": Find where a key has been defined and 5 first lines\n", + ": ==========================\n", "grep -r -A 5 'web_user_list:' examples/$KHEOPS_NAMESPACE\n", "\n", + "\n", ": Search from anything related to database\n", + ": ==========================\n", "grep -R -C 3 'database' examples/$KHEOPS_NAMESPACE\n", "\n", "set +x" @@ -989,7 +1015,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 22, "id": "49bc3fc3", "metadata": {}, "outputs": [ @@ -1050,7 +1076,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 23, "id": "e4a1e8d1", "metadata": {}, "outputs": [ @@ -1058,26 +1084,25 @@ "name": "stdout", "output_type": "stream", "text": [ - "--- /dev/fd/63\t2022-02-01 20:10:53.094525316 -0500\n", - "+++ /dev/fd/62\t2022-02-01 20:10:53.094525316 -0500\n", - "@@ -1,11 +1,15 @@\n", - "-env: prod\n", - "+env: dev\n", - " product: httpd_server\n", - "-web_top_domain: infra.com\n", - "+web_top_domain: dev.infra.net\n", - " web_app: myapp\n", - " web_port: 80\n", - " web_user_list:\n", - " - sysadmins\n", - "+- debug_user\n", - " - domain_org\n", - " - domain_org_external\n", - "-web_cache: 12h\n", - "+web_cache: 1m\n", - "+mysql_users:\n", - "+- debug@10.0.%\n", - "+debug: true\n", + "--- /dev/fd/63\t2022-02-14 13:45:59.223619144 -0500\n", + "+++ /dev/fd/62\t2022-02-14 13:45:59.223619144 -0500\n", + "@@ -1,11 +1,14 @@\n", + " profile:\n", + "- env: prod\n", + "+ env: dev\n", + " product: httpd_server\n", + "- web_top_domain: infra.com\n", + "+ web_top_domain: dev.infra.net\n", + " web_app: myapp\n", + " web_port: 80\n", + " web_user_list:\n", + " - domain_org\n", + " - domain_org_external\n", + "- web_cache: 12h\n", + "+ web_cache: 1m\n", + "+ mysql_users:\n", + "+ - debug@10.0.%\n", + "+ debug: true\n", " \n" ] }, @@ -1094,14 +1119,6 @@ "<(kheops lookup -e node=web.infra.net -e role=web -e env=dev profile)" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "a6feb212", - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "id": "12b1730b", @@ -1112,7 +1129,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 25, "id": "3ac0cc53", "metadata": {}, "outputs": [ @@ -1149,11 +1166,11 @@ "+------------------------+------------------------------+\n", " INFO: Explain candidates:\n", "+----------------------------------------------------------------------------------+-------------------------------+------------------------------+\n", - "| Status | Runtime | Data |\n", + "| Status | Runtime | Key Value |\n", "+----------------------------------------------------------------------------------+-------------------------------+------------------------------+\n", "| | | |\n", - "| Status:{ | Runtime:{ | Data:{ |\n", - "| \"path\": \"/home/jez/volumes/data/prj/bell/training/tiger-ansible/ext/kheops ... | \"scope\": { | \"env\": \"NO_ENV\", |\n", + "| Status:{ | Runtime:{ | Key:{ |\n", + "| \"path\": \"/home/jez/volumes/data/prj/bell/dev/kheops/examples/ex1_enc/defau ... | \"scope\": { | \"env\": \"NO_ENV\", |\n", "| \"status\": \"found\", | \"role\": \"web\" | \"product\": \"NO_PRODUCT\" |\n", "| \"rel_path\": \"examples/ex1_enc/default.yml\" | }, | } |\n", "| } | \"key\": \"profile\", | |\n", @@ -1164,8 +1181,8 @@ "| | \"backend_index\": 0 | |\n", "| | } | |\n", "| | | |\n", - "| Status:{ | Runtime:{ | Data:{ |\n", - "| \"path\": \"/home/jez/volumes/data/prj/bell/training/tiger-ansible/ext/kheops ... | \"scope\": { | \"product\": \"httpd_server\", |\n", + "| Status:{ | Runtime:{ | Key:{ |\n", + "| \"path\": \"/home/jez/volumes/data/prj/bell/dev/kheops/examples/ex1_enc/roles ... | \"scope\": { | \"product\": \"httpd_server\", |\n", "| \"status\": \"found\", | \"role\": \"web\" | \"web_top_domain\": \"\", |\n", "| \"rel_path\": \"examples/ex1_enc/roles/web.yml\" | }, | \"web_app\": \"NO_APP\", |\n", "| } | \"key\": \"profile\", | \"web_port\": 80, |\n", @@ -1176,25 +1193,26 @@ "| | \"backend_index\": 1 | |\n", "| | } | |\n", "+----------------------------------------------------------------------------------+-------------------------------+------------------------------+\n", - "env: NO_ENV\n", - "product: httpd_server\n", - "web_top_domain: ''\n", - "web_app: NO_APP\n", - "web_port: 80\n", - "web_user_list:\n", - "- sysadmins\n", + "profile:\n", + " env: NO_ENV\n", + " product: httpd_server\n", + " web_top_domain: ''\n", + " web_app: NO_APP\n", + " web_port: 80\n", + " web_user_list:\n", + " - sysadmins\n", "\n" ] } ], "source": [ - "kheops lookup -e role=web profile -x" + "kheops lookup -e role=web profile -X" ] }, { "cell_type": "code", "execution_count": null, - "id": "cb111da7", + "id": "07eeed03", "metadata": {}, "outputs": [], "source": []