From 8c07257aafdddf984f649243ada1b98fd59c0c8d Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Thu, 21 Mar 2024 09:23:17 +0100 Subject: [PATCH 1/7] uninstall: add systemd daemon reload --- molecule/uninstall/converge.yml | 3 +++ roles/wildfly_uninstall/handlers/systemd.yml | 4 ++++ roles/wildfly_uninstall/tasks/main.yml | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 roles/wildfly_uninstall/handlers/systemd.yml diff --git a/molecule/uninstall/converge.yml b/molecule/uninstall/converge.yml index d7e9f55a..b47db4a3 100644 --- a/molecule/uninstall/converge.yml +++ b/molecule/uninstall/converge.yml @@ -6,3 +6,6 @@ - vars.yml roles: - name: wildfly_uninstall + post_tasks: + - name: "Flush handlers to ensure they are executed" + ansible.builtin.meta: flush_handlers diff --git a/roles/wildfly_uninstall/handlers/systemd.yml b/roles/wildfly_uninstall/handlers/systemd.yml new file mode 100644 index 00000000..523ccf6b --- /dev/null +++ b/roles/wildfly_uninstall/handlers/systemd.yml @@ -0,0 +1,4 @@ +--- +- name: ""Systemd Daemon Reload"" + ansible.builtin.systemd: + daemon_reload: yes diff --git a/roles/wildfly_uninstall/tasks/main.yml b/roles/wildfly_uninstall/tasks/main.yml index 6ead1b29..80ca82e4 100644 --- a/roles/wildfly_uninstall/tasks/main.yml +++ b/roles/wildfly_uninstall/tasks/main.yml @@ -25,6 +25,8 @@ path: "{{ wildfly_uninstall_systemd_service_conf_file }}" when: - wildfly_uninstall_systemd_service_conf_file + notify: + - "Systemd Daemon Reload" - name: "Delete systemd env file ({{ wildfly_uninstall_systemd_service_file }})." ansible.builtin.file: @@ -32,6 +34,8 @@ path: "{{ wildfly_uninstall_systemd_service_file }}" when: - wildfly_uninstall_systemd_service_file + notify: + - "Systemd Daemon Reload" - name: "Delete user - if requested {{ wildfly_uninstall_delete_username }}" ansible.builtin.user: From f46b52990e6eb555573ba144c190b28a43befb89 Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Fri, 22 Mar 2024 10:03:55 +0100 Subject: [PATCH 2/7] uninstall: fix role to work with wildfly_install defaults out of the box --- roles/wildfly_uninstall/README.md | 2 +- roles/wildfly_uninstall/defaults/main.yml | 2 +- roles/wildfly_uninstall/handlers/systemd.yml | 2 +- roles/wildfly_uninstall/meta/argument_specs.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/wildfly_uninstall/README.md b/roles/wildfly_uninstall/README.md index 230f3dc6..8889eb9a 100644 --- a/roles/wildfly_uninstall/README.md +++ b/roles/wildfly_uninstall/README.md @@ -10,7 +10,7 @@ Role Defaults | Variable | Description | Default | |:---------|:------------|:--------| |`wildfly_uninstall_require_privileges_escalation`| Specifiy if the uninstallation process requires privileges escalation | `True` | -|`wildfly_uninstall_instance_name`| Instance name of the server to uninstall | `{{ instance_name | default('wildfly') }}` | +|`wildfly_uninstall_service_name`| Instance name of the server to uninstall | `{{ instance_name | default('wildfly') }}` | |`wildfly_uninstall_home`| Path to server home | `{{ wildfly_home }}` | |`wildfly_uninstall_systemd_service_file`| Path to the systemd configuration file associated to the server | `/usr/lib/systemd/system/{{ wildfly_uninstall_service_name }}.service` | |`wildfly_uninstall_systemd_service_conf_file`| Path to the env file used by the systemd service associated to the server | `/etc/{{ wildfly_uninstall_service_name }}.conf` | diff --git a/roles/wildfly_uninstall/defaults/main.yml b/roles/wildfly_uninstall/defaults/main.yml index e8551326..c327f919 100644 --- a/roles/wildfly_uninstall/defaults/main.yml +++ b/roles/wildfly_uninstall/defaults/main.yml @@ -1,6 +1,6 @@ --- wildfly_uninstall_require_privileges_escalation: true -wildfly_uninstall_instance_name: "{{ instance_name | default('wildfly') }}" +wildfly_uninstall_service_name: "{{ wildfly_service_name | default('wildfly') }}" wildfly_uninstall_home: "{{ wildfly_home }}" wildfly_uninstall_systemd_service_file: "/usr/lib/systemd/system/{{ wildfly_uninstall_service_name }}.service" wildfly_uninstall_systemd_service_conf_file: "/etc/{{ wildfly_uninstall_service_name }}.conf" diff --git a/roles/wildfly_uninstall/handlers/systemd.yml b/roles/wildfly_uninstall/handlers/systemd.yml index 523ccf6b..1c108b20 100644 --- a/roles/wildfly_uninstall/handlers/systemd.yml +++ b/roles/wildfly_uninstall/handlers/systemd.yml @@ -1,4 +1,4 @@ --- -- name: ""Systemd Daemon Reload"" +- name: "Systemd Daemon Reload" ansible.builtin.systemd: daemon_reload: yes diff --git a/roles/wildfly_uninstall/meta/argument_specs.yml b/roles/wildfly_uninstall/meta/argument_specs.yml index 2daeb3a2..f48e20f4 100644 --- a/roles/wildfly_uninstall/meta/argument_specs.yml +++ b/roles/wildfly_uninstall/meta/argument_specs.yml @@ -8,7 +8,7 @@ argument_specs: type: "bool" # line 3 of defaults/main.yml - wildfly_uninstall_instance_name: + wildfly_uninstall_service_name: default: "{{ instance_name | default('wildfly') }}" description: "Instance name of the server to uninstall" type: "str" From dfa098a61f5c44424a3146cc1e7b370d7ab6e6c3 Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Sat, 23 Mar 2024 18:56:22 +0100 Subject: [PATCH 3/7] molecule: bump cluster to 3 node in colocated scenario --- molecule/colocated/converge.yml | 35 ++++++++++++++++++++++++--------- molecule/colocated/verify.yml | 17 ++++++++++++++-- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/molecule/colocated/converge.yml b/molecule/colocated/converge.yml index 76d5c584..d57e4e94 100644 --- a/molecule/colocated/converge.yml +++ b/molecule/colocated/converge.yml @@ -2,21 +2,38 @@ - name: Deploy first wildfly import_playbook: ../../playbooks/playbook.yml vars: - wildfly_node_id: wildfly-1 - wildfly_instance_name: wildfly-1 - wildfly_service_name: wildfly-1 + id: 1 + wildfly_node_id: "wildfly-{{ id }}" + wildfly_instance_name: "wildfly-{{ id }}" + wildfly_service_name: "wildfly-{{ id }}" wildfly_config_base: standalone-ha.xml - wildfly_install_workdir: "/opt/wildfly-1" + wildfly_install_workdir: "/opt/wildfly-{{ id }}" wildfly_home: "{{ wildfly_install_workdir }}/wildfly-{{ wildfly_version }}/" + wildfly_port_range_offset: "{{ 100 * (id -1) | int }}" skip_db_driver: true + - name: Deploy second wildfly import_playbook: ../../playbooks/playbook.yml vars: - wildfly_node_id: wildfly-2 - wildfly_instance_name: wildfly-2 - wildfly_service_name: wildfly-2 + id: 2 + wildfly_node_id: "wildfly-{{ id }}" + wildfly_instance_name: "wildfly-{{ id }}" + wildfly_service_name: "wildfly-{{ id }}" wildfly_config_base: standalone-ha.xml - wildfly_install_workdir: "/opt/wildfly-2" + wildfly_install_workdir: "/opt/wildfly-{{ id }}" wildfly_home: "{{ wildfly_install_workdir }}/wildfly-{{ wildfly_version }}/" - wildfly_port_range_offset: 100 + wildfly_port_range_offset: "{{ 100 * (id - 1) | int }}" + skip_db_driver: true + +- name: Deploy third wildfly + import_playbook: ../../playbooks/playbook.yml + vars: + id: 3 + wildfly_node_id: "wildfly-{{ id }}" + wildfly_instance_name: "wildfly-{{ id }}" + wildfly_service_name: "wildfly-{{ id }}" + wildfly_config_base: standalone-ha.xml + wildfly_install_workdir: "/opt/wildfly-{{ id }}" + wildfly_home: "{{ wildfly_install_workdir }}/wildfly-{{ wildfly_version }}/" + wildfly_port_range_offset: "{{ 100 * (id - 1) | int }}" skip_db_driver: true diff --git a/molecule/colocated/verify.yml b/molecule/colocated/verify.yml index 718f952d..c41069f7 100644 --- a/molecule/colocated/verify.yml +++ b/molecule/colocated/verify.yml @@ -1,5 +1,5 @@ --- -- name: Deploy first wildfly +- name: Validate first server import_playbook: ../../playbooks/validate.yml vars: wildfly_node_id: wildfly-1 @@ -9,7 +9,8 @@ wildfly_install_workdir: "/opt/wildfly-1" wildfly_home: "{{ wildfly_install_workdir }}/wildfly-{{ wildfly_version }}/" skip_db_driver: true -- name: Deploy second wildfly + +- name: Verify second server import_playbook: ../../playbooks/validate.yml vars: wildfly_node_id: wildfly-2 @@ -20,3 +21,15 @@ wildfly_home: "{{ wildfly_install_workdir }}/wildfly-{{ wildfly_version }}/" wildfly_port_range_offset: 100 skip_db_driver: true + +- name: Verify third server + import_playbook: ../../playbooks/validate.yml + vars: + wildfly_node_id: wildfly-3 + wildfly_instance_name: wildfly-3 + wildfly_service_name: wildfly-3 + wildfly_config_base: standalone-ha.xml + wildfly_install_workdir: "/opt/wildfly-3" + wildfly_home: "{{ wildfly_install_workdir }}/wildfly-{{ wildfly_version }}/" + wildfly_port_range_offset: 200 + skip_db_driver: true From 39be97b4bdbea59cf9af1ab2e9faa0569b0e42ba Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Fri, 22 Mar 2024 17:00:16 +0100 Subject: [PATCH 4/7] Bump Wildfly to latest and provides a script to do it easily --- .ansible-lint | 1 + bump-wildfly-version.txt | 27 +++++++++++++++++++ molecule/uninstall/vars.yml | 4 +-- roles/wildfly_driver/README.md | 2 +- roles/wildfly_driver/defaults/main.yml | 2 +- roles/wildfly_driver/meta/argument_specs.yml | 2 +- roles/wildfly_install/README.md | 2 +- roles/wildfly_install/defaults/main.yml | 2 +- roles/wildfly_install/meta/argument_specs.yml | 2 +- roles/wildfly_systemd/README.md | 2 +- roles/wildfly_systemd/defaults/main.yml | 2 +- roles/wildfly_systemd/meta/argument_specs.yml | 2 +- roles/wildfly_uninstall/README.md | 4 +-- roles/wildfly_utils/defaults/main.yml | 2 +- roles/wildfly_utils/meta/argument_specs.yml | 2 +- roles/wildfly_validation/defaults/main.yml | 2 +- .../meta/argument_specs.yml | 2 +- 17 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 bump-wildfly-version.txt diff --git a/.ansible-lint b/.ansible-lint index 02b7e9fa..d18747f8 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,5 +1,6 @@ # .ansible-lint exclude_paths: + - bump-wildfly-version.sh - .cache/ - .github/ - molecule/ diff --git a/bump-wildfly-version.txt b/bump-wildfly-version.txt new file mode 100644 index 00000000..0e007c65 --- /dev/null +++ b/bump-wildfly-version.txt @@ -0,0 +1,27 @@ +To bump the versin of Wildfly use the script below: + + #!/bin/bash + readonly CURRENT_VERSION=${1} + readonly NEW_VERSION=${2} + + usage() { + echo '' + echo "ex: $(basename ${0}) 29.0. 31.0.1.Final." + } + + if [ -z "${CURRENT_VERSION}" ]; then + echo 'Please provide the 5 first character of the current version.' + usage + exit 1 + fi + + if [ -z "${NEW_VERSION}" ]; then + echo 'Please provide the new version, including .Final' + usage + exit 2 + fi + + for file_to_edit in $(grep -e "${CURRENT_VERSION}" -r roles/ molecule/ | cut -f1 -d: | sort -u) + do + sed -e "s;${CURRENT_VERSION}.*.Final;${NEW_VERSION};g" -i "${file_to_edit}" + done diff --git a/molecule/uninstall/vars.yml b/molecule/uninstall/vars.yml index 89a3372c..e824a08d 100644 --- a/molecule/uninstall/vars.yml +++ b/molecule/uninstall/vars.yml @@ -1,4 +1,4 @@ --- wildfly_uninstall_service_name: wildfly -wildfly_uninstall_home: /opt/wildfly/wildfly-29.0.0.Final -wildfly_uninstall_path_to_archive: /opt/wildfly/wildfly-29.0.0.Final.zip +wildfly_uninstall_home: /opt/wildfly/wildfly-31.0.1.Final +wildfly_uninstall_path_to_archive: /opt/wildfly/wildfly-31.0.1.Final.zip diff --git a/roles/wildfly_driver/README.md b/roles/wildfly_driver/README.md index de6059ac..1daa910e 100644 --- a/roles/wildfly_driver/README.md +++ b/roles/wildfly_driver/README.md @@ -13,7 +13,7 @@ Role Defaults |:---------|:------------|:--------| |`wildfly_driver_module_dir`| Path for module installation | `{{ wildfly_home }}/modules/{{ wildfly_driver_module_name | replace('.', '/') }}/main` | |`wildfly_driver_jar_installation_path`| Path for jdbc driver installation | `{{ wildfly_driver_module_dir }}/{{ wildfly_driver_jar_filename }}` | -|`wildfly_version`| Wildfly version to install | `29.0.0.Final` | +|`wildfly_version`| Wildfly version to install | `31.0.1.Final` | |`wildfly_home`| Wildfly installation directory | `/opt/wildfly/wildfly-{{ wildfly_version }}/` | |`wildfly_user`| posix user account for wildfly | `wildfly` | |`wildfly_group`| posix group for wildfly | `{{ wildfly_user }}` | diff --git a/roles/wildfly_driver/defaults/main.yml b/roles/wildfly_driver/defaults/main.yml index 11f69833..bfb188fd 100644 --- a/roles/wildfly_driver/defaults/main.yml +++ b/roles/wildfly_driver/defaults/main.yml @@ -1,7 +1,7 @@ --- wildfly_user: 'wildfly' wildfly_group: "{{ wildfly_user }}" -wildfly_version: '29.0.0.Final' +wildfly_version: '31.0.1.Final' wildfly_home: "/opt/wildfly/wildfly-{{ wildfly_version }}/" wildfly_driver_module_dir: "{{ wildfly_home }}/modules/{{ wildfly_driver.module_name | replace('.', '/') }}/main" wildfly_driver_jar_installation_path: "{{ wildfly_driver_module_dir }}/{{ wildfly_driver_jar_filename }}" diff --git a/roles/wildfly_driver/meta/argument_specs.yml b/roles/wildfly_driver/meta/argument_specs.yml index c5577155..029b6be9 100644 --- a/roles/wildfly_driver/meta/argument_specs.yml +++ b/roles/wildfly_driver/meta/argument_specs.yml @@ -26,7 +26,7 @@ argument_specs: description: "Name for the jdbc driver module" type: "str" wildfly_version: - default: "29.0.0.Final" + default: "31.0.1.Final" description: "Wildfly version to install" type: "str" wildfly_home: diff --git a/roles/wildfly_install/README.md b/roles/wildfly_install/README.md index 2d23546e..ad514ce1 100644 --- a/roles/wildfly_install/README.md +++ b/roles/wildfly_install/README.md @@ -15,7 +15,7 @@ Role Defaults | Variable | Description | Default | |:---------|:------------|:--------| -|`wildfly_version`| Wildfly version to install | `29.0.0.Final` | +|`wildfly_version`| Wildfly version to install | `31.0.1.Final` | |`wildfly_archive_filename`| Wildfly download archive name | `wildfly-{{ wildfly_version }}.zip` | |`wildfly_download_baseurl`| Base URL for wildfly download | `https://github.com/wildfly/wildfly/releases/download` | |`wildfly_install_workdir`| Wildfly installation directory (where the server files are unzipped) | `/opt/wildfly/` | diff --git a/roles/wildfly_install/defaults/main.yml b/roles/wildfly_install/defaults/main.yml index 3634e817..dff7276b 100644 --- a/roles/wildfly_install/defaults/main.yml +++ b/roles/wildfly_install/defaults/main.yml @@ -1,5 +1,5 @@ --- -wildfly_version: '29.0.0.Final' +wildfly_version: '31.0.1.Final' wildfly_archive_filename: "wildfly-{{ wildfly_version }}.zip" wildfly_download_baseurl: 'https://github.com/wildfly/wildfly/releases/download' wildfly_install_workdir: '/opt/wildfly/' diff --git a/roles/wildfly_install/meta/argument_specs.yml b/roles/wildfly_install/meta/argument_specs.yml index 6c4fe63a..8a7a7ab0 100644 --- a/roles/wildfly_install/meta/argument_specs.yml +++ b/roles/wildfly_install/meta/argument_specs.yml @@ -2,7 +2,7 @@ argument_specs: main: options: wildfly_version: - default: "29.0.0.Final" + default: "31.0.1.Final" description: "Wildfly version to install" type: "str" wildfly_archive_filename: diff --git a/roles/wildfly_systemd/README.md b/roles/wildfly_systemd/README.md index 01114bd7..b203642a 100644 --- a/roles/wildfly_systemd/README.md +++ b/roles/wildfly_systemd/README.md @@ -18,7 +18,7 @@ Role Defaults |:---------|:------------|:--------| |`wildfly_user`| posix user account for wildfly service | `wildfly` | |`wildfly_group`| posix group for wildfly service | `{{ wildfly_user }}` | -|`wildfly_version`| Wildfly version to install | `29.0.0.Final` | +|`wildfly_version`| Wildfly version to install | `31.0.1.Final` | |`wildfly_install_workdir`| Wildfly installation directory (where the server files are unzipped) | `/opt/wildfly/` | |`wildfly_home`| Wildfly installation directory (WILDFLY_HOME) | `{{ wildfly_install_workdir }}wildfly-{{ wildfly_version }}/` | |`wildfly_config_base`| Base standalone.xml config for instance | `standalone.xml` unless `wildfly_config_custom_file` is used | diff --git a/roles/wildfly_systemd/defaults/main.yml b/roles/wildfly_systemd/defaults/main.yml index bf222f09..145b1ddc 100644 --- a/roles/wildfly_systemd/defaults/main.yml +++ b/roles/wildfly_systemd/defaults/main.yml @@ -1,7 +1,7 @@ --- wildfly_user: 'wildfly' wildfly_group: "{{ wildfly_user }}" -wildfly_version: '29.0.0.Final' +wildfly_version: '31.0.1.Final' wildfly_install_workdir: '/opt/wildfly/' wildfly_home: "{{ wildfly_install_workdir }}wildfly-{{ wildfly_version }}" wildfly_config_base: 'standalone.xml' diff --git a/roles/wildfly_systemd/meta/argument_specs.yml b/roles/wildfly_systemd/meta/argument_specs.yml index 94404b59..7c8b410b 100644 --- a/roles/wildfly_systemd/meta/argument_specs.yml +++ b/roles/wildfly_systemd/meta/argument_specs.yml @@ -18,7 +18,7 @@ argument_specs: description: "posix group for wildfly service" type: "str" wildfly_version: - default: "29.0.0.Final" + default: "31.0.1.Final" description: "Wildfly version to install" type: "str" wildfly_install_workdir: diff --git a/roles/wildfly_uninstall/README.md b/roles/wildfly_uninstall/README.md index 8889eb9a..ca6b0aa7 100644 --- a/roles/wildfly_uninstall/README.md +++ b/roles/wildfly_uninstall/README.md @@ -38,8 +38,8 @@ Role Variables gather_facts: no vars: wildfly_uninstall_service_name: wildfly - wildfly_uninstall_home: /opt/wildfly/wildfly-29.0.0.Final - wildfly_uninstall_path_to_archive: /opt/wildfly/wildfly-29.0.0.Final.zip + wildfly_uninstall_home: /opt/wildfly/wildfly-31.0.1.Final + wildfly_uninstall_path_to_archive: /opt/wildfly/wildfly-31.0.1.Final.zip roles: - name: wildfly_uninstall ``` diff --git a/roles/wildfly_utils/defaults/main.yml b/roles/wildfly_utils/defaults/main.yml index 169d3491..3463d3c5 100644 --- a/roles/wildfly_utils/defaults/main.yml +++ b/roles/wildfly_utils/defaults/main.yml @@ -5,7 +5,7 @@ jboss_cli_apply_cp_default_conflict_default: '--override-all' wildfly_no_restart_after_patch: False wildfly_user: wildfly wildfly_group: "{{ wildfly_user }}" -wildfly_version: '29.0.0.Final' +wildfly_version: '31.0.1.Final' wildfly_install_workdir: '/opt/wildfly/' wildfly_home: "{{ wildfly_install_workdir }}wildfly-{{ wildfly_version }}/" jboss_home: "{{ wildfly_home }}" diff --git a/roles/wildfly_utils/meta/argument_specs.yml b/roles/wildfly_utils/meta/argument_specs.yml index e033a061..57c10034 100644 --- a/roles/wildfly_utils/meta/argument_specs.yml +++ b/roles/wildfly_utils/meta/argument_specs.yml @@ -26,7 +26,7 @@ argument_specs: description: "posix group for wildfly" type: "str" wildfly_version: - default: "29.0.0.Final" + default: "31.0.1.Final" description: "Wildfly version to install" type: "str" wildfly_install_workdir: diff --git a/roles/wildfly_validation/defaults/main.yml b/roles/wildfly_validation/defaults/main.yml index b1eb2eca..6dad4d78 100644 --- a/roles/wildfly_validation/defaults/main.yml +++ b/roles/wildfly_validation/defaults/main.yml @@ -5,7 +5,7 @@ wildfly_service_name: wildfly wildfly_http_port: 8080 wildfly_https_port: 8443 wildfly_controller_port: 9990 -wildfly_version: '29.0.0.Final' +wildfly_version: '31.0.1.Final' wildfly_install_workdir: '/opt/wildfly/' wildfly_home: "{{ wildfly_install_workdir }}wildfly-{{ wildfly_version }}/" wildfly_validation_systemd_pidfile: "{{ wildfly_home }}/standalone/{{ wildfly_service_name }}.pid" diff --git a/roles/wildfly_validation/meta/argument_specs.yml b/roles/wildfly_validation/meta/argument_specs.yml index df625dca..7b697841 100644 --- a/roles/wildfly_validation/meta/argument_specs.yml +++ b/roles/wildfly_validation/meta/argument_specs.yml @@ -22,7 +22,7 @@ argument_specs: description: "Server HTTPS port" type: "str" wildfly_version: - default: "29.0.0.Final" + default: "31.0.1.Final" description: "Wildfly version to install" type: "str" wildfly_install_workdir: From a7920336fcd0ba9dd679641b2d86ea28ac1dd82c Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Sat, 23 Mar 2024 17:43:36 +0100 Subject: [PATCH 5/7] rm invalid and unused prepare.yml --- molecule/colocated/prepare.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 molecule/colocated/prepare.yml diff --git a/molecule/colocated/prepare.yml b/molecule/colocated/prepare.yml deleted file mode 100644 index 2ff6dad4..00000000 --- a/molecule/colocated/prepare.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- -- name: Prepare - hosts: all - vars: - sudo_pkg_name - tasks: - - - name: Gather the package facts - ansible.builtin.package_facts: - manager: auto - - - name: Print the package facts - ansible.builtin.debug: - var: ansible_facts.packages - - - name: "Check if {{ sudo_pkg_name }} is installed." - ansible.builtin.assert: - that: - - sudo_pkg_name in ansible_facts.packages - - - name: "Ensure required packages are installed." - become: yes - ansible.builtin.yum: - name: - - java-11-openjdk - - procps-ng - - tzdata-java - state: present - - - name: Display Ansible version - ansible.builtin.debug: - msg: "Ansible version is {{ ansible_version.full }}" From 1b0ab8a59683ff7ab5f492c733576cc04b961160 Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Mon, 25 Mar 2024 13:14:46 +0100 Subject: [PATCH 6/7] prospero: update README --- roles/wildfly_prospero/README.md | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/roles/wildfly_prospero/README.md b/roles/wildfly_prospero/README.md index 73412e91..a4c5d753 100644 --- a/roles/wildfly_prospero/README.md +++ b/roles/wildfly_prospero/README.md @@ -35,30 +35,22 @@ Example Playbook - name: Playbook to install Wildfly using Prospero hosts: all vars: - wildfly_install_user: 'wildfly' - wildfly_install_group: "{{ wildfly_install_user }}" wildfly_install_use_prospero: True - wildfly_prospero_scenario_enable: True collections: - middleware_automation.wildfly tasks: - - name: "Run Prospero scenario only upstream." - block: - - name: "Ensure required local user and group exists." - ansible.builtin.include_role: - name: wildfly_install - tasks_from: user.yml - - - name: "Install server using Prospero" - ansible.builtin.include_role: - name: wildfly_install - - - name: "Run server with systemd" - ansible.builtin.include_role: - name: wildfly_systemd - when: - - wildfly_prospero_scenario_enable is defined and wildfly_prospero_scenario_enable - + - name: "Ensure required local user and group exists." + ansible.builtin.include_role: + name: wildfly_install + tasks_from: user.yml + + - name: "Install server using Prospero" + ansible.builtin.include_role: + name: wildfly_install + + - name: "Run server with systemd" + ansible.builtin.include_role: + name: wildfly_systemd ``` Author Information From 03532ff2e2e1b2a35e9b1b263453061ba7bf3f33 Mon Sep 17 00:00:00 2001 From: Romain Pelisse Date: Mon, 25 Mar 2024 15:14:38 +0100 Subject: [PATCH 7/7] prospero: rm dup use of wildfly_user --- molecule/prospero/converge.yml | 5 ----- roles/wildfly_prospero/README.md | 5 ----- 2 files changed, 10 deletions(-) diff --git a/molecule/prospero/converge.yml b/molecule/prospero/converge.yml index a063e9f2..34267053 100644 --- a/molecule/prospero/converge.yml +++ b/molecule/prospero/converge.yml @@ -11,11 +11,6 @@ tasks: - name: "Run Prospero scenario only upstream." block: - - name: "Ensure required local user and group exists." - ansible.builtin.include_role: - name: wildfly_install - tasks_from: user.yml - - name: "Install server using Prospero" ansible.builtin.include_role: name: wildfly_install diff --git a/roles/wildfly_prospero/README.md b/roles/wildfly_prospero/README.md index a4c5d753..327835ef 100644 --- a/roles/wildfly_prospero/README.md +++ b/roles/wildfly_prospero/README.md @@ -39,11 +39,6 @@ Example Playbook collections: - middleware_automation.wildfly tasks: - - name: "Ensure required local user and group exists." - ansible.builtin.include_role: - name: wildfly_install - tasks_from: user.yml - - name: "Install server using Prospero" ansible.builtin.include_role: name: wildfly_install