File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/jboss7.cpython-310.pyc
o
�N�g�_ � @ s� d Z ddlZddlZddlZddlZddlm mZ ddlm Z e�
e�Z d%dd�Z
dd� Zd d
� Zd&dd�Zd&d
d�Zd&dd�Zdd� Zdd� Zd&dd�Zdd� Zd'dd�Zd(dd �Zd)d!d"�Zd#d$� ZdS )*ab
Manage JBoss 7 Application Server via CLI interface
.. versionadded:: 2015.5.0
This state uses the jboss-cli.sh script from a JBoss or Wildfly installation and parses its output to determine the execution result.
In order to run each state, a jboss_config dictionary with the following properties must be passed:
.. code-block:: yaml
jboss:
cli_path: '/opt/jboss/jboss-7.0/bin/jboss-cli.sh'
controller: 10.11.12.13:9999
cli_user: 'jbossadm'
cli_password: 'jbossadm'
If the controller doesn't require a password, then the cli_user and cli_password parameters are optional.
Since same dictionary with configuration will be used in all the states, it may be more convenient to move JBoss configuration and other properties
to the pillar.
Example of application deployment from local filesystem:
.. code-block:: yaml
application_deployed:
jboss7.deployed:
- salt_source:
target_file: '/tmp/webapp.war'
- jboss_config: {{ pillar['jboss'] }}
For the sake of brevity, examples for each state assume that jboss_config is contained in the pillar.
� N)�CommandExecutionErrorFc C s� t �d| � | di dd�}d}i }td || |d�}|d r�|d }|r�td
|| |d�} | d r8| |d d<