{"id":20991,"date":"2022-12-12T10:36:29","date_gmt":"2022-12-12T09:36:29","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=20991"},"modified":"2022-12-12T10:36:29","modified_gmt":"2022-12-12T09:36:29","slug":"overcome-jboss-cli-limitations-with-ansible","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/","title":{"rendered":"Overcome jboss-cli Limitations with Ansible"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The work on <a href=\"https:\/\/www.dbi-services.com\/products\/yak\/\" target=\"_blank\" rel=\"noreferrer noopener\">YaK<\/a> JBoss\/WildFly component helped me to improve my knowledge of Ansible, but not only. I also learned a lot on jboss-cli scripting and especially limitations that comes with it. For instance, followings are not supported by jboss-cli language:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>nesting if<\/li>\n\n\n\n<li>incrementing\/modifying variables<\/li>\n\n\n\n<li>no while loop<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Even if there are some possibilities to overcome them with programming language like Java, as I am on Ansible, I decided to use it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to Credential Store<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To encrypt any sensitive data in the configuration, we can use expression feature of E<a href=\"https:\/\/wildfly-security.github.io\/wildfly-elytron\/\" target=\"_blank\" rel=\"noreferrer noopener\">lytron<\/a> security module. This is done in several steps:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Create a secret key credential store:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/subsystem=elytron\/secret-key-credential-store=initial:add(path=\/data\/certs\/initial.cs)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. Create an expression and associated resolver which will use the key just created:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/subsystem=elytron\/expression=encryption:add(resolvers=&#091;{name=initial-resolver, credential-store=initial, secret-key=key}])<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3. Create the main credential store with a password encrypted via initial-resolver:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/subsystem=elytron\/credential-store=CredentialStore:add(path=\/data\/certs\/CredentialStore.jceks,create=true,credential-reference={clear-text=\"${ENC::initial-resolver:RUxZAUMQf3QXsesbrrM0YGbcv1ayxSymgPQrc3Ye5gohjDrAHVs=}\"})<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Encrypting key is done with this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/subsystem=elytron\/expression=encryption:create-expression(clear-text=\"key-string\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4. Create a new key in the encrypted CredentialStore:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/subsystem=elytron\/credential-store=CredentialStore:generate-secret-key(alias=main-key)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then, we are good to encrypt any string either via CredentialStore or expression.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Idempotency with pure jboss-cli<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Even if not perfect, it is possible to implement idempotency with pure jboss-cli scripting language.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, I want to add secret in a credential store only if it is not already present, but method will be slightly different as my previous <a href=\"https:\/\/www.dbi-services.com\/blog\/jboss-eap-and-wildfly-cli-scripting-via-ansible\/\" target=\"_blank\" rel=\"noreferrer noopener\">blog<\/a> as <code>read-resource()<\/code> method does not apply here.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get existing aliases, the following method can be executed with a result of type array:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\n&#x5B;standalone@192.168.33.10:9993 \/]  \/subsystem=elytron\/credential-store=CredentialStore:read-aliases()\n{\n    &quot;outcome&quot; =&gt; &quot;success&quot;,\n    &quot;result&quot; =&gt; &#x5B;\n        &quot;key&quot;,\n        &quot;jks_password&quot;,\n        &quot;datasource_password&quot;\n    ]\n}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Fortunately, <code>for<\/code> loop exist and can be used on that result:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nset found=no\nfor obj in \/subsystem=elytron\/credential-store=CredentialStore:read-aliases()\n    if (result == jks_password) of :resolve-expression(expression=$obj)\n        set found=yes\n    end-if\ndone\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">At line 1, I set found to no.<br>Line 2 is the beginning of the for loop.<br>Line 3 is testing the value of the current cell ($obj) of the array. The way of testing variable is a bit weird in jboss-cli, but it works fine like that. If result of <code>resolve-expression<\/code> matches condition (equal to jks_password), then found will be set to yes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Second part of the script is to test if <code>found <\/code>is equal to yes or no.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nif (result == &quot;yes&quot;) of :resolve-expression(expression=$found)\n    echo nochange\nelse\n    \/subsystem=elytron\/credential-store=CredentialStore:add-alias(alias=jks_password,secret-value=MyPassword)\n    echo changed add\nend-if\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">If it is yes, I only print &#8220;nochange&#8221;. If test is false (found not equal to yes), I will trigger the <code>add <\/code>command and echo <code>changed <\/code>so that Ansible is aware and task display accurate state.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One might think this could be applied to any operation or attribute, but sadly it is not that easy. We will see an example in next section.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ansible to the Rescue<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As I wanted to make everything idempotent, I wanted also encryption expression creation to be.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>for<\/code> loop can&#8217;t be used as in previous chapter because I did not find any way to compare object value ({name=CredentialStore-resolver,credential-store=CredentialStore,secret-key=main-key}) with expected value. Also <code>resolve-expression<\/code> on this fails with <code>\"WFLYCTL0097: Wrong type for 'expression'. Expected [EXPRESSION, STRING] but was OBJECT\"<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My idea here was to first find the index in the LIST with the same name with a trick: Do the <code>for<\/code> loop in Ansible and not in jboss-cli scripting language. As in Ansible, I can&#8217;t know how many items LIST will contain I must decide of a maximum amount of tries. For this, I am creating a variable named <code>jboss_cli_list_max_iterations<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the code for the search in Jinja template:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nset found=no\nset position=0\n# jboss_cli_list_max_iterations: {{ jboss_cli_list_max_iterations }}\ntry {# BEGINNING of try-catch block #}\n{% for index in range(jboss_cli_list_max_iterations) +%}\n  # index {{ index }}\n  if (result == &quot;{{ query_name }}&quot;) of {{ operation.address }}:read-attribute(name={{  operation.name }}&#x5B;{{ index }}]{{ point }})\n  set found=yes\n  set position={{ index }}\n  ls exit # fake command to raise exception\n  end-if\n  if (result == undefined) of {{ operation.address }}:read-attribute(name={{  operation.name }}&#x5B;{{ index }}]{{ point }})\n  set found=no\n  ls exit # fake command to raise exception\n  end-if\n  set position={{ index }}\n{% endfor %}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As there is no while loop and no way to exit the for loop earlier (when index has been found), I am using try-catch option. Whenever item has been found (line 7), I am updating required variables (found and position) and trigger a failing command that will exit the <code>for<\/code> loop (line 10).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Catch section will look like:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\ncatch\n  if (result == &quot;7&quot;) of :resolve-expression(expression=$position)\n    echo error: jboss_cli_list_max_iterations reached (8)\n    exit\n  end-if\nend-try\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">In this section, I check if we reached the maximum defined loop or not (exiting with error).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, in a second phase, I must check each field of the resolver individually:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nif (result != &quot;CredentialStore-resolver&quot;) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;$position].name)\n    ls exit # fake command to raise exception\nend-if\nif (result != &quot;CredentialStore-resolver&quot;) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;$position].name)\n    set different=yes\nend-if\nif (result != &quot;CredentialStore&quot;) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;$position].credential-store)\n    set different=yes\nend-if\nif (result != &quot;main-key&quot;) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;$position].secret-key)\n    set different=yes\nend-if\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">If any field is different from target value, I update <code>different<\/code> variable to <code>yes<\/code>. If it is different, I remove the item at position I set earlier in template:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nif (result == &quot;yes&quot;) of :resolve-expression(expression=$different)\n    \/subsystem=elytron\/expression=encryption:list-remove(name=resolvers,index=$position)\n    set found=no\nend-if\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, simply add it:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nif (result == &quot;yes&quot;) of :resolve-expression(expression=$found)\n    echo nochange\nelse\n    \/subsystem=elytron\/expression=encryption:list-add(name=resolvers,value={name=CredentialStore-resolver,credential-store=CredentialStore,secret-key=main-key})\n    echo changed list-add\nend-if\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The code could be difficult to read as it mixes jinja templating as well as jboss-cli scripting language. Generated code will look like:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nset found=no\n# jboss_cli_list_max_iterations: 8\ntry\n# index 0\nif (result == &quot;CredentialStore-resolver&quot;) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;0].name)\n    set found=yes\n    set position=0\n    ls exit # fake command to raise exception\nend-if\n# index 1\nset position=1\nif (result == &quot;CredentialStore-resolver&quot;) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;1].name)\n    set found=yes\n    ls exit # fake command to raise exception\nend-if\nif (result == undefined) of \/subsystem=elytron\/expression=encryption:read-attribute(name=resolvers&#x5B;1].name)\n    set found=no\n    ls exit # fake command to raise exception\nend-if\n...\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Generated code can grow very quickly. For example, SSL hardening script is more than 6k bytes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Enhance This<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One big advantage of this solution is that generated script are idempotent without Ansible, so they can be used on any JBoss-EAP\/WildFly installation directly without Ansible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The disadvantage is the complexity of the code brought by the mix of Jinja and jboss-cli scripting language and the syntax differences (ie. <code>endif<\/code> vs <code>end-if<\/code>) which could be confusing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid this complexity, we could move all this to the HTTP Management API via REST.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The work on YaK JBoss\/WildFly component helped me to improve my knowledge of Ansible, but not only. I also learned a lot on jboss-cli scripting and especially limitations that comes with it. For instance, followings are not supported by jboss-cli language: Even if there are some possibilities to overcome them with programming language like Java,&hellip;&nbsp;<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1321,4134,2721],"tags":[2777],"class_list":["post-20991","post","type-post","status-publish","format-standard","category-ansible","category-application-server","category-yak","tag-jinja"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v29.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Overcome jboss-cli Limitations with Ansible - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Overcome jboss-cli Limitations with Ansible\" \/>\n<meta property=\"og:description\" content=\"The work on YaK JBoss\/WildFly component helped me to improve my knowledge of Ansible, but not only. I also learned a lot on jboss-cli scripting and especially limitations that comes with it. For instance, followings are not supported by jboss-cli language: Even if there are some possibilities to overcome them with programming language like Java,&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-12T09:36:29+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\"},\"headline\":\"Overcome jboss-cli Limitations with Ansible\",\"datePublished\":\"2022-12-12T09:36:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/\"},\"wordCount\":734,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"jinja\"],\"articleSection\":[\"Ansible\",\"Application Server\",\"YaK\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/\",\"name\":\"Overcome jboss-cli Limitations with Ansible - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-12-12T09:36:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/overcome-jboss-cli-limitations-with-ansible\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Overcome jboss-cli Limitations with Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"description\":\"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Overcome jboss-cli Limitations with Ansible - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/","og_locale":"en_US","og_type":"article","og_title":"Overcome jboss-cli Limitations with Ansible","og_description":"The work on YaK JBoss\/WildFly component helped me to improve my knowledge of Ansible, but not only. I also learned a lot on jboss-cli scripting and especially limitations that comes with it. For instance, followings are not supported by jboss-cli language: Even if there are some possibilities to overcome them with programming language like Java,&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2022-12-12T09:36:29+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8"},"headline":"Overcome jboss-cli Limitations with Ansible","datePublished":"2022-12-12T09:36:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/"},"wordCount":734,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["jinja"],"articleSection":["Ansible","Application Server","YaK"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/","url":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/","name":"Overcome jboss-cli Limitations with Ansible - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2022-12-12T09:36:29+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/overcome-jboss-cli-limitations-with-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Overcome jboss-cli Limitations with Ansible"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"description":"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.","url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/20991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=20991"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/20991\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=20991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=20991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=20991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}