From 227cd6d5b4a79ca3903dd58d03000ad46f4f7663 Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Tue, 28 May 2024 09:26:32 +0200 Subject: [PATCH 1/8] Upgrade Ansible collection to the newest version --- .gitignore | 1 + README.md | 21 ++++++++++++------- meta/runtime.yml | 2 +- requirements.txt | 2 ++ roles/oneagent/README.md | 2 +- roles/oneagent/tasks/params/params.yml | 3 ++- .../tasks/provide-installer/download-unix.yml | 2 +- .../provide-installer/download-windows.yml | 2 +- .../tasks/provide-installer/download.yml | 3 ++- roles/oneagent/vars/aix.yml | 7 +++---- roles/oneagent/vars/linux.yml | 10 +++++---- roles/oneagent/vars/main.yml | 15 +++++++------ roles/oneagent/vars/win32nt.yml | 7 +++---- 13 files changed, 43 insertions(+), 34 deletions(-) create mode 100644 .gitignore create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0f35a3f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dynatrace-oneagent-* \ No newline at end of file diff --git a/README.md b/README.md index 210f815..9e534d4 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,29 @@ # Dynatrace OneAgent collection - -In its current state, collection consist of a single role that deploys Dynatrace OneAgent on Linux and Windows operating systems using dedicated configuration and ensures the OneAgent service maintains a running state. +In its current state, the collection consists of a single role that deploys Dynatrace OneAgent on Linux and Windows operating systems using dedicated configuration and ensures the OneAgent service maintains a running state. ## Requirements +* Ansible >= 2.15.0 +* pywinrm >= 0.4.1 -Using this collection requires the following: +## Setup +`pip install -r requirements.txt` -* Ansible >= 2.9.0 -* pywinrm >= 0.4.1 +## Build +`ansible-galaxy collection build .` ## Installation +To install the latest stable release of the collection on your system, call: -Use `ansible-galaxy collection install dynatrace.oneagent` to install the latest stable release of the collection on your system. +`ansible-galaxy collection install dynatrace.oneagent` -## License +To install the locally built collection on your system, call: +`ansible-galaxy collection install dynatrace-oneagent-.tar.gz` + +## License Licensed under the MIT License. ## Support - In case of difficulties, contact our [SUPPORT]. [SUPPORT]: https://www.dynatrace.com/support/contact-support/ diff --git a/meta/runtime.yml b/meta/runtime.yml index 1edecb3..c0958b6 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,3 +1,3 @@ --- # Required version of ansible-core to use the collection -requires_ansible: ">=2.14.0" +requires_ansible: ">=2.15.0" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5d2fc98 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +ansible >= 2.15.0 +pywinrm >= 0.4.1 \ No newline at end of file diff --git a/roles/oneagent/README.md b/roles/oneagent/README.md index 190dd27..208cc27 100644 --- a/roles/oneagent/README.md +++ b/roles/oneagent/README.md @@ -41,7 +41,7 @@ The following variables are available in `defaults/main/` and can be overridden: | Name | Default | Description |-|-|- -| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed). +| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed) in `https://.dev.dynatracelabs.com` format. | `oneagent_paas_token` | `-` | The [PaaS Token] retrieved from the "Deploy Dynatrace" installer page. | `oneagent_local_installer` | `-` | The Path to OneAgent installer stored on the main node. | `oneagent_installer_arch` | `-` | Specifies the OneAgent installer architecture. diff --git a/roles/oneagent/tasks/params/params.yml b/roles/oneagent/tasks/params/params.yml index 227b5af..b076340 100644 --- a/roles/oneagent/tasks/params/params.yml +++ b/roles/oneagent/tasks/params/params.yml @@ -22,8 +22,9 @@ msg: "{{ oneagent_unknown_arch | format(oneagent_download_arch, oneagent_available_arch) }}" when: oneagent_is_operation_installation and not oneagent_download_arch in oneagent_available_arch +- ansible.builtin.include_tasks: tasks/params/params-{{ oneagent_system_family }}.yml + - name: Validate OneAgent installer version parameter - ansible.builtin.include_tasks: tasks/params/params-{{ oneagent_system_family }}.yml ansible.builtin.fail: msg: "{{ oneagent_version_lower_than_minimal | format(oneagent_version, oneagent_minimal_install_version) }}" when: oneagent_is_operation_installation and oneagent_version != 'latest' and oneagent_version < oneagent_minimal_install_version diff --git a/roles/oneagent/tasks/provide-installer/download-unix.yml b/roles/oneagent/tasks/provide-installer/download-unix.yml index 95b58ca..d7810d4 100644 --- a/roles/oneagent/tasks/provide-installer/download-unix.yml +++ b/roles/oneagent/tasks/provide-installer/download-unix.yml @@ -10,7 +10,7 @@ ansible.builtin.get_url: url: "{{ _oneagent_installer_url }}" dest: "{{ oneagent_installer_path }}" - validate_certs: "{{ oneagent_validate_certs | bool }}" + validate_certs: "{{ oneagent_validate_certs }}" mode: "0755" headers: Authorization: Api-Token {{ oneagent_paas_token }} diff --git a/roles/oneagent/tasks/provide-installer/download-windows.yml b/roles/oneagent/tasks/provide-installer/download-windows.yml index 6a35647..af5140f 100644 --- a/roles/oneagent/tasks/provide-installer/download-windows.yml +++ b/roles/oneagent/tasks/provide-installer/download-windows.yml @@ -9,7 +9,7 @@ win_get_url: url: "{{ _oneagent_installer_url }}" dest: "{{ oneagent_installer_path }}" - validate_certs: "{{ oneagent_validate_certs | bool }}" + validate_certs: "{{ oneagent_validate_certs }}" headers: Authorization: Api-Token {{ oneagent_paas_token }} no_log: true diff --git a/roles/oneagent/tasks/provide-installer/download.yml b/roles/oneagent/tasks/provide-installer/download.yml index 4457748..d083572 100644 --- a/roles/oneagent/tasks/provide-installer/download.yml +++ b/roles/oneagent/tasks/provide-installer/download.yml @@ -9,8 +9,9 @@ "#VER": "{{ (oneagent_version == 'latest') | ternary('', 'version/') + oneagent_version }}" "#ARCH": "{{ oneagent_download_arch }}" +- ansible.builtin.include_tasks: provide-installer/download-{{ oneagent_system_family }}.yml + - name: Verify download result - ansible.builtin.include_tasks: provide-installer/download-{{ oneagent_system_family }}.yml ansible.builtin.fail: msg: "{{ oneagent_failed_download | format(_oneagent_download_result.response | default(_oneagent_download_result.msg)) }}" when: _oneagent_download_result.failed|default(false) diff --git a/roles/oneagent/vars/aix.yml b/roles/oneagent/vars/aix.yml index 601fc68..1ff07bb 100644 --- a/roles/oneagent/vars/aix.yml +++ b/roles/oneagent/vars/aix.yml @@ -4,12 +4,11 @@ oneagent_default_install_dir: /opt/dynatrace/oneagent oneagent_default_download_dir: "{{ ansible_env['TEMP'] | default('/tmp') }}" oneagent_download_system: aix -oneagent_available_arch: "{{ [ oneagent_default_arch ] }}" +oneagent_available_arch: + - "{{ oneagent_default_arch }}" oneagent_download_arch: "{{ oneagent_installer_arch | default(oneagent_default_arch, true) }}" -oneagent_install_path: > - "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | - default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', '\\1') }}" +oneagent_install_path: "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', '\\1') }}" oneagent_download_path: "{{ oneagent_download_dir | default(oneagent_default_download_dir, true) }}" oneagent_installer_path: "{{ oneagent_download_path }}/Dynatrace-OneAgent-AIX-{{ oneagent_version }}.sh" oneagent_ctl_bin_path: "{{ oneagent_install_path }}/agent/tools/oneagentctl" diff --git a/roles/oneagent/vars/linux.yml b/roles/oneagent/vars/linux.yml index a348168..83e9941 100644 --- a/roles/oneagent/vars/linux.yml +++ b/roles/oneagent/vars/linux.yml @@ -4,12 +4,14 @@ oneagent_default_install_dir: /opt/dynatrace/oneagent oneagent_default_download_dir: "{{ ansible_env['TEMP'] | default('/tmp') }}" oneagent_download_system: unix -oneagent_available_arch: "{{ [ oneagent_default_arch, 'ppcle', 's390', 'arm' ] }}" +oneagent_available_arch: + - "{{ oneagent_default_arch }}" + - "ppcle" + - "s390" + - "arm" oneagent_download_arch: "{{ oneagent_installer_arch | default(oneagent_default_arch, true) }}" -oneagent_install_path: > - "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', - '\\1') }}" +oneagent_install_path: "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)','\\1') }}" oneagent_download_path: "{{ oneagent_download_dir | default(oneagent_default_download_dir, true) }}" oneagent_installer_arch_name: "{{ (oneagent_download_arch == oneagent_default_arch) | ternary('', oneagent_download_arch + '-') }}" oneagent_installer_path: "{{ oneagent_download_path }}/Dynatrace-OneAgent-Linux-{{ oneagent_installer_arch_name }}{{ oneagent_version }}.sh" diff --git a/roles/oneagent/vars/main.yml b/roles/oneagent/vars/main.yml index ab766f0..b1f33c1 100644 --- a/roles/oneagent/vars/main.yml +++ b/roles/oneagent/vars/main.yml @@ -9,13 +9,12 @@ oneagent_system_is_windows: "{{ oneagent_system_name == 'win32nt' }}" oneagent_system_family: "{{ oneagent_system_is_windows | ternary('windows', 'unix') }}" oneagent_is_operation_uninstall: "{{ oneagent_package_state == 'absent' }}" -oneagent_is_operation_configuration: > - "{{ not oneagent_is_operation_uninstall and oneagent_environment_url|length == 0 and oneagent_paas_token|length == 0 and oneagent_local_installer| - length == 0 }}" -oneagent_is_operation_installation: "{{ not (oneagent_is_operation_uninstall or oneagent_is_operation_configuration) }}" +oneagent_is_operation_configuration: "{{ not oneagent_is_operation_uninstall and oneagent_environment_url|length == 0 and oneagent_paas_token|length == 0 and oneagent_local_installer|length == 0 }}" +oneagent_is_operation_installation: "{{ not (oneagent_is_operation_uninstall or oneagent_is_operation_configuration | bool) }}" -oneagent_passed_install_args: "{{ (oneagent_install_args + oneagent_platform_install_args) | unique }}" +oneagent_passed_install_args: "{{ (oneagent_install_args + oneagent_platform_install_args) | unique(case_sensitive=False) }}" oneagent_default_download_url: "#URL/api/v1/deployment/installer/agent/#SYS/default/#VER?arch=#ARCH" -oneagent_additional_reporting_params: > - "{{ [ '--set-deployment-metadata=\"orchestration_tech=Ansible\"', '--set-deployment-metadata=\"tech_version=' + ansible_version.full - + '\"', '--set-deployment-metadata=\"script_version=' + oneagent_script_version + '\"' ] }}" +oneagent_additional_reporting_params: + - "--set-deployment-metadata=\"orchestration_tech=Ansible\"" + - "--set-deployment-metadata=\"tech_version='{{ ansible_version.full }}'\"" + - "--set-deployment-metadata=\"script_version='{{ oneagent_script_version }}'\"" diff --git a/roles/oneagent/vars/win32nt.yml b/roles/oneagent/vars/win32nt.yml index 5f5336c..10bec14 100644 --- a/roles/oneagent/vars/win32nt.yml +++ b/roles/oneagent/vars/win32nt.yml @@ -4,12 +4,11 @@ oneagent_default_install_dir: "{{ ansible_env.SystemDrive }}\\Program Files\\dyn oneagent_default_download_dir: "{{ ansible_env['TEMP'] | default('C:\\Windows\\Temp') }}" oneagent_download_system: windows -oneagent_available_arch: "{{ [ oneagent_default_arch ] }}" +oneagent_available_arch: + - "{{ oneagent_default_arch }}" oneagent_download_arch: "{{ oneagent_installer_arch | default(oneagent_default_arch, true) }}" -oneagent_install_path: > - "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | - default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', '\\1') }}" +oneagent_install_path: "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', '\\1') }}" oneagent_ctl_bin_path: "{{ oneagent_install_path }}\\agent\\tools\\oneagentctl.exe" oneagent_download_path: "{{ oneagent_download_dir | default(oneagent_default_download_dir, true) }}" oneagent_installer_path: "{{ oneagent_download_path }}\\Dynatrace-OneAgent-Windows-{{ oneagent_version }}.exe" From d539caa3fc43282351ae72e80324643b61dcfeff Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 17 Jun 2024 10:32:17 +0200 Subject: [PATCH 2/8] Set pywinrm as only needed on Windows --- README.md | 2 ++ requirements.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e534d4..cf87ef4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ In its current state, the collection consists of a single role that deploys Dynatrace OneAgent on Linux and Windows operating systems using dedicated configuration and ensures the OneAgent service maintains a running state. ## Requirements +### General * Ansible >= 2.15.0 +### Windows * pywinrm >= 0.4.1 ## Setup diff --git a/requirements.txt b/requirements.txt index 5d2fc98..46aa4a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ ansible >= 2.15.0 -pywinrm >= 0.4.1 \ No newline at end of file +pywinrm >= 0.4.1 ; sys_platform == 'win32' From cfb4822618204fe6ffdc81f1a7a9468493b65e1b Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 17 Jun 2024 10:39:49 +0200 Subject: [PATCH 3/8] Change lists format --- roles/oneagent/vars/aix.yml | 3 +-- roles/oneagent/vars/linux.yml | 6 +----- roles/oneagent/vars/win32nt.yml | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/roles/oneagent/vars/aix.yml b/roles/oneagent/vars/aix.yml index 1ff07bb..f11aede 100644 --- a/roles/oneagent/vars/aix.yml +++ b/roles/oneagent/vars/aix.yml @@ -4,8 +4,7 @@ oneagent_default_install_dir: /opt/dynatrace/oneagent oneagent_default_download_dir: "{{ ansible_env['TEMP'] | default('/tmp') }}" oneagent_download_system: aix -oneagent_available_arch: - - "{{ oneagent_default_arch }}" +oneagent_available_arch: [ "{{ oneagent_default_arch }}" ] oneagent_download_arch: "{{ oneagent_installer_arch | default(oneagent_default_arch, true) }}" oneagent_install_path: "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', '\\1') }}" diff --git a/roles/oneagent/vars/linux.yml b/roles/oneagent/vars/linux.yml index 83e9941..a68145c 100644 --- a/roles/oneagent/vars/linux.yml +++ b/roles/oneagent/vars/linux.yml @@ -4,11 +4,7 @@ oneagent_default_install_dir: /opt/dynatrace/oneagent oneagent_default_download_dir: "{{ ansible_env['TEMP'] | default('/tmp') }}" oneagent_download_system: unix -oneagent_available_arch: - - "{{ oneagent_default_arch }}" - - "ppcle" - - "s390" - - "arm" +oneagent_available_arch: [ "{{ oneagent_default_arch }}", "ppcle", "s390", "arm" ] oneagent_download_arch: "{{ oneagent_installer_arch | default(oneagent_default_arch, true) }}" oneagent_install_path: "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)','\\1') }}" diff --git a/roles/oneagent/vars/win32nt.yml b/roles/oneagent/vars/win32nt.yml index 10bec14..ae71a23 100644 --- a/roles/oneagent/vars/win32nt.yml +++ b/roles/oneagent/vars/win32nt.yml @@ -4,8 +4,7 @@ oneagent_default_install_dir: "{{ ansible_env.SystemDrive }}\\Program Files\\dyn oneagent_default_download_dir: "{{ ansible_env['TEMP'] | default('C:\\Windows\\Temp') }}" oneagent_download_system: windows -oneagent_available_arch: - - "{{ oneagent_default_arch }}" +oneagent_available_arch: [ "{{ oneagent_default_arch }}" ] oneagent_download_arch: "{{ oneagent_installer_arch | default(oneagent_default_arch, true) }}" oneagent_install_path: "{{ oneagent_passed_install_args | select('regex', 'INSTALL_PATH') | first | default(oneagent_default_install_dir) | regex_replace('INSTALL_PATH=(.*)', '\\1') }}" From 688aa93f606af73f470a384c53419911c6db3e8a Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 17 Jun 2024 12:04:59 +0200 Subject: [PATCH 4/8] Remove environment-specific oneagent_environment_url format from README --- roles/oneagent/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/oneagent/README.md b/roles/oneagent/README.md index 208cc27..190dd27 100644 --- a/roles/oneagent/README.md +++ b/roles/oneagent/README.md @@ -41,7 +41,7 @@ The following variables are available in `defaults/main/` and can be overridden: | Name | Default | Description |-|-|- -| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed) in `https://.dev.dynatracelabs.com` format. +| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed). | `oneagent_paas_token` | `-` | The [PaaS Token] retrieved from the "Deploy Dynatrace" installer page. | `oneagent_local_installer` | `-` | The Path to OneAgent installer stored on the main node. | `oneagent_installer_arch` | `-` | Specifies the OneAgent installer architecture. From e8b39db555917f151be1c8af1cb32a165ceef262 Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 17 Jun 2024 12:15:17 +0200 Subject: [PATCH 5/8] Filter through bool wherever needed --- roles/oneagent/tasks/install/post-install-unix.yml | 4 ++-- roles/oneagent/tasks/install/post-install-windows.yml | 4 ++-- roles/oneagent/tasks/main.yml | 2 +- roles/oneagent/tasks/provide-installer/download-unix.yml | 2 +- roles/oneagent/tasks/provide-installer/download-windows.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/oneagent/tasks/install/post-install-unix.yml b/roles/oneagent/tasks/install/post-install-unix.yml index 5773ae2..e918a21 100644 --- a/roles/oneagent/tasks/install/post-install-unix.yml +++ b/roles/oneagent/tasks/install/post-install-unix.yml @@ -3,9 +3,9 @@ ansible.builtin.reboot: reboot_timeout: oneagent_reboot_timeout register: _oneagent_reboot_status - when: oneagent_reboot_host + when: oneagent_reboot_host | bool - name: Check the host reboot status ansible.builtin.fail: msg: "{{ oneagent_reboot_failed }}" - when: oneagent_reboot_host and not _oneagent_reboot_status.rebooted|default(false) + when: oneagent_reboot_host | bool and not _oneagent_reboot_status.rebooted|default(false) diff --git a/roles/oneagent/tasks/install/post-install-windows.yml b/roles/oneagent/tasks/install/post-install-windows.yml index 5b5aa45..9d61d9b 100644 --- a/roles/oneagent/tasks/install/post-install-windows.yml +++ b/roles/oneagent/tasks/install/post-install-windows.yml @@ -3,9 +3,9 @@ win_reboot: reboot_timeout: oneagent_reboot_timeout register: _oneagent_reboot_status - when: oneagent_reboot_host + when: oneagent_reboot_host | bool - name: Check the host reboot status ansible.builtin.fail: msg: "{{ oneagent_reboot_failed }}" - when: oneagent_reboot_host and not _oneagent_reboot_status.rebooted|default(false) + when: oneagent_reboot_host | bool and not _oneagent_reboot_status.rebooted|default(false) diff --git a/roles/oneagent/tasks/main.yml b/roles/oneagent/tasks/main.yml index b9cb4ea..e94c9ec 100644 --- a/roles/oneagent/tasks/main.yml +++ b/roles/oneagent/tasks/main.yml @@ -25,7 +25,7 @@ always: - name: Cleanup ansible.builtin.include_tasks: cleanup/cleanup.yml - when: oneagent_is_operation_installation and not oneagent_preserve_installer + when: oneagent_is_operation_installation and not (oneagent_preserve_installer | bool) - name: Uninstall OneAgent ansible.builtin.include_tasks: uninstall/uninstall.yml diff --git a/roles/oneagent/tasks/provide-installer/download-unix.yml b/roles/oneagent/tasks/provide-installer/download-unix.yml index d7810d4..95b58ca 100644 --- a/roles/oneagent/tasks/provide-installer/download-unix.yml +++ b/roles/oneagent/tasks/provide-installer/download-unix.yml @@ -10,7 +10,7 @@ ansible.builtin.get_url: url: "{{ _oneagent_installer_url }}" dest: "{{ oneagent_installer_path }}" - validate_certs: "{{ oneagent_validate_certs }}" + validate_certs: "{{ oneagent_validate_certs | bool }}" mode: "0755" headers: Authorization: Api-Token {{ oneagent_paas_token }} diff --git a/roles/oneagent/tasks/provide-installer/download-windows.yml b/roles/oneagent/tasks/provide-installer/download-windows.yml index af5140f..6a35647 100644 --- a/roles/oneagent/tasks/provide-installer/download-windows.yml +++ b/roles/oneagent/tasks/provide-installer/download-windows.yml @@ -9,7 +9,7 @@ win_get_url: url: "{{ _oneagent_installer_url }}" dest: "{{ oneagent_installer_path }}" - validate_certs: "{{ oneagent_validate_certs }}" + validate_certs: "{{ oneagent_validate_certs | bool }}" headers: Authorization: Api-Token {{ oneagent_paas_token }} no_log: true From 1fdf91d98f853202fb920888e593ed8cdcd0ff5e Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 24 Jun 2024 10:30:30 +0200 Subject: [PATCH 6/8] Fix configuration application --- roles/oneagent/tasks/config/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/oneagent/tasks/config/config.yml b/roles/oneagent/tasks/config/config.yml index ff06923..fe6e1f0 100644 --- a/roles/oneagent/tasks/config/config.yml +++ b/roles/oneagent/tasks/config/config.yml @@ -1,7 +1,7 @@ --- - name: Combine configuration parameters ansible.builtin.set_fact: - _oneagent_all_config_args: "{{ oneagent_passed_install_args | map('regex_search', '(--set-(.*))') | select('string') | list }} --restart-service" + _oneagent_all_config_args: "{{ oneagent_passed_install_args | map('regex_search', '(--set-(.*))') | select('string') | list + ['--restart-service'] }}" no_log: true - name: Apply OneAgent configuration From b64d70d934a772954ac4a2826bfc00d6c30eda6a Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 24 Jun 2024 10:50:13 +0200 Subject: [PATCH 7/8] Link to environment url format in readme --- roles/oneagent/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/oneagent/README.md b/roles/oneagent/README.md index 190dd27..ead885a 100644 --- a/roles/oneagent/README.md +++ b/roles/oneagent/README.md @@ -41,7 +41,7 @@ The following variables are available in `defaults/main/` and can be overridden: | Name | Default | Description |-|-|- -| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed). +| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed), see [Direct download from your environment](#direct-download-from-your-environment) for format. | `oneagent_paas_token` | `-` | The [PaaS Token] retrieved from the "Deploy Dynatrace" installer page. | `oneagent_local_installer` | `-` | The Path to OneAgent installer stored on the main node. | `oneagent_installer_arch` | `-` | Specifies the OneAgent installer architecture. From 0d0e7fee9131991b125a26441949ef7f69d37f82 Mon Sep 17 00:00:00 2001 From: Filip Szweda Date: Mon, 24 Jun 2024 11:04:40 +0200 Subject: [PATCH 8/8] Update readme --- roles/oneagent/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/oneagent/README.md b/roles/oneagent/README.md index ead885a..06d1a77 100644 --- a/roles/oneagent/README.md +++ b/roles/oneagent/README.md @@ -41,7 +41,7 @@ The following variables are available in `defaults/main/` and can be overridden: | Name | Default | Description |-|-|- -| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (SaaS or Managed), see [Direct download from your environment](#direct-download-from-your-environment) for format. +| `oneagent_environment_url` | `-` | The URL of the target Dynatrace environment (see [Direct download from your environment](#direct-download-from-your-environment)). | `oneagent_paas_token` | `-` | The [PaaS Token] retrieved from the "Deploy Dynatrace" installer page. | `oneagent_local_installer` | `-` | The Path to OneAgent installer stored on the main node. | `oneagent_installer_arch` | `-` | Specifies the OneAgent installer architecture.