diff --git a/defaults/main.yml b/defaults/main.yml index 0f00f6a..d09bce2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,10 +24,10 @@ qdrouterd_host_group: "qdrouterd_all" qdrouterd_service_name: "{{ _qdrouterd_service_name }}" qdrouterd_etc_conf_path: "{{ _qdrouterd_etc_conf_path }}" qdrouterd_etc_conf_file: "{{ _qdrouterd_etc_conf_file }}" -qdrouterd_log_file: "/var/log/qdrouterd/qdrouterd.log" +qdrouterd_log_file: "/var/log/qdrouterd/qdrouterd.log" # Qdrouterd router config -qdrouterd_host_count: "{{ groups['qdrouterd_all'] | length}}" +qdrouterd_host_count: "{{ groups['qdrouterd_all'] | length }}" qdrouterd_mode: "{% if qdrouterd_host_count == '1' %}standalone{% else %}interior{% endif %}" qdrouterd_listener_addr: 0.0.0.0 qdrouterd_listener_port_ssl: 31459 @@ -48,7 +48,7 @@ qdrouterd_log_enable: "trace+" # Qdrouterd SSL support qdrouterd_ssl_cert: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd.pem" qdrouterd_ssl_key: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd.key" -#qdrouterd_ssl_ca_cert: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd-ca.pem" +# qdrouterd_ssl_ca_cert: "{{ qdrouterd_etc_conf_path }}/ssl/qdrouterd-ca.pem" # Set qdrouterd_ssl_sefl_signed_regen to true if you want to generate a new # SSL certificate for Qdrouterd when this playbook runs. You can also change @@ -58,6 +58,6 @@ qdrouterd_ssl_self_signed_subject: "/C=US/ST=Massachusetts/L=Boston/O=IT/CN={{ a # Define user-provided SSL certificates in: # /etc/openstack_deploy/user_variables.yml -#qdrouterd_user_ssl_cert: -#qdrouterd_user_ssl_key: -#qdrouterd_user_ssl_ca_cert: +# qdrouterd_user_ssl_cert: +# qdrouterd_user_ssl_key: +# qdrouterd_user_ssl_ca_cert: diff --git a/handlers/main.yml b/handlers/main.yml index a3a08df..9824831 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,2 @@ --- -# handlers file for ansible-qdrouterd \ No newline at end of file +# handlers file for ansible-qdrouterd diff --git a/meta/main.yml b/meta/main.yml index 9da55ea..3210df8 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -16,15 +16,23 @@ galaxy_info: author: Andy Smith description: This role installs and configures the qpid-dispatch-router license: Apache - min_ansible_version: 2.3 + min_ansible_version: "2.10" + namespace: openstack role_name: qdrouterd platforms: - - name: Ubuntu - versions: - - focal - categories: - - messaging - - cloud - - openstack + - name: Debian + versions: + - bullseye + - name: Ubuntu + versions: + - focal + - jammy + - name: EL + versions: + - "9" + galaxy_tags: + - messaging + - cloud + - openstack dependencies: [] diff --git a/tasks/main.yml b/tasks/main.yml index 26849ea..c81dae3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,9 +24,11 @@ tags: - always -- import_tasks: qdrouterd_pre_install.yml +- name: Importing qdrouterd_pre_install tasks + import_tasks: qdrouterd_pre_install.yml -- import_tasks: qdrouterd_install.yml +- name: Importing qdrouterd_install tasks + import_tasks: qdrouterd_install.yml # Qdrouterd SSL/TLS listener configuration # @@ -38,17 +40,20 @@ # # playbooks/roles/qdrouterd/defaults/main.yml # -- include_tasks: qdrouterd_ssl_self_signed.yml +- name: Including qdrouterd_ssl_self_signed tasks + include_tasks: qdrouterd_ssl_self_signed.yml when: > qdrouterd_user_ssl_cert is not defined or qdrouterd_user_ssl_key is not defined tags: - qdrouterd-config -- import_tasks: qdrouterd_ssl_user_provided.yml +- name: Importing qdrouterd_ssl_user_provided tasks + import_tasks: qdrouterd_ssl_user_provided.yml tags: - qdrouterd-config -- import_tasks: qdrouterd_post_install.yml +- name: Importing qdrouterd_post_install tasks + import_tasks: qdrouterd_post_install.yml tags: - qdrouterd-config diff --git a/tasks/qdrouterd_install.yml b/tasks/qdrouterd_install.yml index 2a9a44b..9459bea 100644 --- a/tasks/qdrouterd_install.yml +++ b/tasks/qdrouterd_install.yml @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -- include_tasks: "qdrouterd_install_{{ ansible_pkg_mgr }}.yml" +- name: Including qdrouterd_install tasks + include_tasks: "qdrouterd_install_{{ ansible_pkg_mgr }}.yml" tags: - qdrouterd_server-install @@ -25,6 +26,7 @@ tags: - qdrouterd_server-install -- import_tasks: qdrouterd_started.yml +- name: Importing qdrouterd_started tasks + import_tasks: qdrouterd_started.yml tags: - qdrouterd_server-config diff --git a/tasks/qdrouterd_install_yum.yml b/tasks/qdrouterd_install_yum.yml index 214e7e2..a59e352 100644 --- a/tasks/qdrouterd_install_yum.yml +++ b/tasks/qdrouterd_install_yum.yml @@ -15,30 +15,30 @@ # # TODO (ansmith): conditionally enable epel # -#- name: Check if EPEL repo is already configured. -# stat: path={{ epel_repofile_path }} -# register: epel_repofile_result -# -#- name: Install EPEL repo. -# yum: -# name: "{{ epel_repo_url }}" -# state: present -# register: result -# when: not epel_repofile_result.stat.exists -# -#- name: Import EPEL GPG key -# rpm_key: -# key: "{{ epel_repo_gpg_key_url }}" -# state: present -# when: not epel_repofile_result.stat.exists +# - name: Check if EPEL repo is already configured. +# stat: path={{ epel_repofile_path }} +# register: epel_repofile_result # -#- name: Ensure yum-config-manager is installed -# package: -# name: yum-utils -# state: present +# - name: Install EPEL repo. +# yum: +# name: "{{ epel_repo_url }}" +# state: present +# register: result +# when: not epel_repofile_result.stat.exists # -#- name: Ensure that EPEL is enabled -# shell: yum-config-manager --enable epel +# - name: Import EPEL GPG key +# rpm_key: +# key: "{{ epel_repo_gpg_key_url }}" +# state: present +# when: not epel_repofile_result.stat.exists +# +# - name: Ensure yum-config-manager is installed +# package: +# name: yum-utils +# state: present +# +# - name: Ensure that EPEL is enabled +# shell: yum-config-manager --enable epel - name: Install Qpid Dispatch Router (qdrouterd) packages yum: diff --git a/tasks/qdrouterd_post_install.yml b/tasks/qdrouterd_post_install.yml index 8fc6e36..6278d77 100644 --- a/tasks/qdrouterd_post_install.yml +++ b/tasks/qdrouterd_post_install.yml @@ -44,5 +44,6 @@ tags: - qdrouterd-config -- include_tasks: qdrouterd_restart.yml +- name: Including qdrouterd_restart tasks + include_tasks: qdrouterd_restart.yml when: qdrouterd_config_changed is changed diff --git a/tasks/qdrouterd_pre_install.yml b/tasks/qdrouterd_pre_install.yml index 229f230..5102955 100644 --- a/tasks/qdrouterd_pre_install.yml +++ b/tasks/qdrouterd_pre_install.yml @@ -32,5 +32,3 @@ mode: "0755" tags: - qdrouterd-config - - diff --git a/tasks/qdrouterd_restart.yml b/tasks/qdrouterd_restart.yml index 6b2224c..2ffdc7a 100644 --- a/tasks/qdrouterd_restart.yml +++ b/tasks/qdrouterd_restart.yml @@ -13,5 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -- import_tasks: qdrouterd_stopped.yml -- import_tasks: qdrouterd_started.yml +- name: Importing qdrouterd_stopped tasks + import_tasks: qdrouterd_stopped.yml + +- name: Importing qdrouterd_started tasks + import_tasks: qdrouterd_started.yml diff --git a/tasks/qdrouterd_ssl_key_store.yml b/tasks/qdrouterd_ssl_key_store.yml index 7d6214d..62cd52a 100644 --- a/tasks/qdrouterd_ssl_key_store.yml +++ b/tasks/qdrouterd_ssl_key_store.yml @@ -31,7 +31,7 @@ - name: Register a fact for the cert and key set_fact: - qdrouterd_ssl_cert_fact: "{{ _qdrouterd_ssl_cert.content }}" - qdrouterd_ssl_key_fact: "{{ _qdrouterd_ssl_key.content }}" + qdrouterd_ssl_cert_fact: "{{ _qdrouterd_ssl_cert.content }}" + qdrouterd_ssl_key_fact: "{{ _qdrouterd_ssl_key.content }}" tags: - qdrouterd-ssl diff --git a/tasks/qdrouterd_ssl_self_signed.yml b/tasks/qdrouterd_ssl_self_signed.yml index bd46a07..64650ac 100644 --- a/tasks/qdrouterd_ssl_self_signed.yml +++ b/tasks/qdrouterd_ssl_self_signed.yml @@ -15,11 +15,14 @@ # We create the self-signed SSL certificate and key only on the first # Qdrouterd container. -- include_tasks: qdrouterd_ssl_key_create.yml +- name: Including qdrouterd_ssl_key_create tasks + include_tasks: qdrouterd_ssl_key_create.yml when: inventory_hostname == groups[qdrouterd_host_group][0] -- include_tasks: qdrouterd_ssl_key_store.yml +- name: Including qdrouterd_ssl_key_store tasks + include_tasks: qdrouterd_ssl_key_store.yml when: inventory_hostname == groups[qdrouterd_host_group][0] -- include_tasks: qdrouterd_ssl_key_distribute.yml +- name: Including qdrouterd_ssl_key_distribute tasks + include_tasks: qdrouterd_ssl_key_distribute.yml when: inventory_hostname != groups[qdrouterd_host_group][0]