Ansible Execution Agent - Online¶
Goal¶
Tip
ansible_execution_environment_definition_template_list
Features¶
The connection between the ITA system only accepts outbound http/https from closed environments (PULL-form)
Can generate Ansible execution environment by using Ansible Builder and Ansible Runner(Use any environment/module)
Allows for redundant systems(exclusive control)
Can confirm the version of the agent
Pre-requisites¶
Hardware requirements¶
Confirmed working specifications
Resource type |
Required resource |
---|---|
CPU |
2 Cores (3.0 GHz, x86_64) |
Memory |
6GB |
Storage |
40GB |
Resource type |
Required resource |
---|---|
CPU |
4 Cores (3.0 GHz, x86_64) |
Memory |
8GB |
Storage |
80GB |
警告
Connection requirements¶
Connection destination ITA
各種インストール、及びモジュール、BaseImage取得先等(インターネットへの接続を含む)
作業対象サーバ

OS requirements¶
OS type |
Version |
---|---|
RHEL9 |
Red Hat Enterprise Linux release 9.4 (Plow) |
Almalinux8 |
AlmaLinux release 8.9 (Midnight Oncilla) |
Tip
$ sudo vi /etc/selinux/config
SELINUX=Permissive
$ getenforce
Permissive
Software requirements¶
Python 3.9 must be installed and have an alias for python 3 commands and pip3 commands
The user must be able to run the following commands
$ sudo
$ python3 -V
Python 3.9.18
$ pip3 -V
pip 21.2.3 from /usr/lib/python3.9/site-packages/pip (python 3.9)
Other requirements¶
RHEL(if using license with support)¶
If the user is using the paid version of Ansible-builder or Ansible-runner, make sure to register the subscription and activate the repository before running the installer.
Red Hat container registry confirmation
podman login registry.redhat.io
Repository used
rhel-9-for-x86_64-baseos-rpms rhel-9-for-x86_64-appstream-rpms ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms
Confirming activated repository/activating repository
sudo subscription-manager repos --list-enabled sudo subscription-manager repos --enable=rhel-9-for-x86_64-baseos-rpms sudo subscription-manager repos --enable=rhel-9-for-x86_64-appstream-rpms sudo subscription-manager repos --enable=ansible-automation-platform-2.5-for-rhel-9-x86_64-rpms
Base images confirmed compatible with Ansible builder¶
The following base images are confirmed to be compatible
Base image type |
Image fetch destination |
Remarks |
---|---|---|
ubi9 |
registry.access.redhat.com/ubi9/ubi-init:latest |
|
rhel9 |
registry.redhat.io/ansible-automation-platform-24/ee-supported-rhel9:latest |
For license with support |
Parameter list¶
Parameter name |
Contents |
Default value |
Changeable |
Added version |
Remarks |
---|---|---|---|---|---|
IS_NON_CONTAINER_LOG |
Settting item that outputs log as file |
1 |
No |
2.5.1 |
|
LOG_LEVEL |
Level of information for the output log[INFO/DEBUG] |
INFO |
Yes |
2.5.1 |
|
LOGGING_MAX_SIZE |
Log rotation file size |
10485760 |
Yes |
2.5.1 |
Default state is "Comment out" |
LOGGING_MAX_FILE |
Log rotation backup numbers |
30 |
Yes |
2.5.1 |
Default state is "Comment out" |
LANGUAGE |
Language settings |
en |
Yes |
2.5.1 |
|
TZ |
Time zone |
Asia/Tokyo |
Yes |
2.5.1 |
|
PYTHON_CMD |
python execution command of the executing virtual environment |
<PATH of the installed environment>/poetry run python3 |
No |
2.5.1 |
|
PYTHONPATH |
python execution command of the executing virtual environment |
<Installation path input in the interactive item>/ita_ag_ansible_execution/ |
Yes |
2.5.1 |
|
APP_PATH |
Install destination PATH |
<Installation path input in the interactive item> |
Yes |
2.5.1 |
|
STORAGEPATH |
Data storage destination PATH |
<Save location input in the interactive item>/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/storage |
Yes |
2.5.1 |
|
LOGPATH |
Log storage destination PATH |
<Save location input in the interactive item>/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/log |
Yes |
2.5.1 |
|
EXASTRO_ORGANIZATION_ID |
Connection destination ORGANIZATION_ID |
<ORGANIZATION_ID input in the interactive item> |
Yes |
2.5.1 |
|
EXASTRO_WORKSPACE_ID |
Connection destination WORKSPACE_ID |
<WORKSPACE_ID input in the interactive item> |
Yes |
2.5.1 |
|
EXASTRO_URL |
Connection destination ITA URL |
<URL input in the interactive item> |
Yes |
2.5.1 |
|
EXASTRO_REFRESH_TOKEN |
Connection destination ITAのEXASTRO_REFRESH_TOKEN |
<input in the interactive item EXASTRO_REFRESH_TOKEN> |
Yes |
2.5.1 |
|
EXECUTION_ENVIRONMENT_NAMES |
Users can specify the execution environment.
If blank, all execution environments will be target.
Divide execution environments with "," if specifying multiple.
|
Blank |
Yes |
2.5.1 |
|
AGENT_NAME |
Agent identifier registered to the service. |
ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item> |
No |
2.5.1 |
|
USER_ID |
Agent identifier. |
<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item> |
No |
2.5.1 |
|
ITERATION |
Number of process iterations before the settings initialize |
10 |
Yes |
2.5.1 |
|
EXECUTE_INTERVAL |
Interval after main processes |
5 |
Yes |
2.5.1 |
Tip
EXECUTION_ENVIRONMENT_NAMES=<Execution environment name 1>,<Execution environment name 2>
Install¶
Preparation¶
$ wget https://raw.githubusercontent.com/exastro-suite/exastro-it-automation/refs/heads/main/ita_root/ita_ag_ansible_execution/setup.sh
$ chmod 755 ./setup.sh
Interactive items¶
Agent's version information
Service name
Source code installat destination
Data storage destination
Ansible-builder and Ansible-runner
Connection destination ITA's connection information(URL、ORGANIZATION_ID、WORKSPACE_ID、REFRESH_TOKEN)
Install Ansible Execution Agent¶
$ ./setup.sh install
- The user will be asked about the agent's installation mode. Specify which mode to use.1: Installs required modules and source code for the service(s), and register and executes service2: Registers and executes additional services.3: Specify env file and registers/executes servicse.※ Mode 2 and 3 requires that 1 is already executed.
Please select which process to execute.
1: Create ENV, Install, Register service
2: Create ENV, Register service
3: Register service
q: Quit installer
select value: (1, 2, 3, q) :
Tip
Pressing the Enter key in the following step starts an interactive installation process where the user can input the data for the required items.
'No value + Enter' is input while default value exists, the default value will be used.
-> Enter
Input the version of the Agent. Tag specification: X.Y.Z, Branch specification: X.Y [default: No Input+Enter(Latest release version)]:
Input Value [default: main ]:
The Agent service name is in the following format: ita-ag-ansible-execution-20241112115209622. Select n to specify individual names. (y/n):
Input Value [default: y ]:
Input the Agent service name . The string ita-ag-ansible-execution- is added to the start of the name.:
Input Value :
Specify full path for the install location.:
Input Value [default: /home/<Login user>/exastro ]:
Specify full path for the data storage location.:
Input Value [default: /home/<Login user>/exastro ]:
Select which Ansible-builder and/or Ansible-runner to use(1, 2) [1=Ansible 2=Red Hat Ansible Automation Platform] :
Input Value [default: 1 ]:
Input the ITA connection URL.:
Input Value :
Input ORGANIZATION_ID.:
Input Value :
Input WORKSPACE_ID.:
Input Value :
Input a REFRESH_TOKEN for a user that can log in to ITA. If the token cannot be input here, change the EXASTRO_REFRESH_TOKEN in the generated .env file.:
Input Value [default: ]:
Do you want to start the Agent service? (y/n)y
Install Ansible Execution Agent Infomation:
Agent Service id: <Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Agent Service Name: ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Storage Path: /home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/storage
Env Path: /home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/.env
'No value + Enter' is input while default value exists, the default value will be used.
-> Enter
The Agent service name is in the following format: ita-ag-ansible-execution-20241112115209622. Select n to specify individual names. (y/n):
Input Value [default: y ]:
Input the Agent service name . The string ita-ag-ansible-execution- is added to the start of the name.:
Input Value :
Specify full path for the install location.:
Input Value [default: /home/<Login user>/exastro ]:
Specify full path for the data storage location.:
Input Value [default: /home/<Login user>/exastro ]:
Input the ITA connection URL.:
Input Value :
Input ORGANIZATION_ID.:
Input Value :
Input WORKSPACE_ID.:
Input Value :
Input a REFRESH_TOKEN for a user that can log in to ITA. If the token cannot be input here, change the EXASTRO_REFRESH_TOKEN in the generated .env file.:
Input Value [default: ]:
Do you want to start the Agent service? (y/n)y
Install Ansible Execution Agent Infomation:
Agent Service id: <Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Agent Service Name: ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Storage Path: /home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/storage
Env Path: /home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/.env
'No value + Enter' is input while default value exists, the default value will be used.
-> Enter
Input the full path for the .env file.:
Input Value :
Do you want to start the Agent service? (y/n)y
Install Ansible Execution Agent Infomation:
Agent Service id: <Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Agent Service Name: ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Storage Path: /home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/storage
Env Path: /home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/.env
Uninstall¶
$ ./setup.sh uninstall
Tip
- The user will be asked about the agent's uninstallation mode. Specify which mode to use.1: Deletes service and data.2: Deletes service. The data will not be deleted.3: Deletes data only.※ 3 requires that 2 has been executed.
Please select which process to execute.
1: Delete service, Delete Data
2: Delete service
3: Delete Data
q: Quit uninstaller
select value: (1, 2, 3, q) :
Pressing the Enter key in the following step starts an interactive installation process where the user can input the data for the required items.
Input a SERVICE_NAME.(e.g. ita-ag-ansible-execution-xxxxxxxxxxxxx):
Input a STORAGE_PATH.(e.g. /home/cloud-user/exastro/<SERVICE_ID>):
Input a SERVICE_NAME.(e.g. ita-ag-ansible-execution-xxxxxxxxxxxxx):
Input a STORAGE_PATH.(e.g. /home/cloud-user/exastro/<SERVICE_ID>):
Manually operating/confirming service.¶
# Displaying changes in the setting file
$ sudo systemctl daemon-reload
# Check service status
$ sudo systemctl status ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Start service
$ sudo systemctl start ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Stop service
$ sudo systemctl stop ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Restart service
$ sudo systemctl restart ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Displaying changes in the setting file
$ systemctl --user daemon-reload
# Check service status
$ systemctl --user status ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Start service
$ systemctl --user start ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Stop service
$ systemctl --user stop ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
# Restart service
$ systemctl --user restart ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>
Confirming service log¶
- Application log
/home/<Login user>/exastro/<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>/log/
ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>.log
ita-ag-ansible-execution-<Service unique identifier:yyyyMMddHHmmssfff or String specified in the interactive item>.log.xx
※Log rotated files have numeric values added to the end. Use it to find log rotation size and storage period.
- System and components logs
/var/log/message
※For information regarding Ansible-builder, Ansible-runner, podman and other related components, see the different component's log output destination.