ansible-middleware / amq

A collection to manage AMQ brokers
Apache License 2.0
18 stars 11 forks source link

Update to connectors config (add parameter for NIC name selection) #84

Closed guidograzioli closed 1 year ago

guidograzioli commented 1 year ago

This change contains a rework of how connectors configuration is declared/generated, in the case of static_cluster discovery. After the change, settings declared in activemq_connectors are merged with similar settings generated by the collection inferred from play hosts and global variables (formerly, declared settings would override generated settings).

This means that now a deployment of two hosts in static_cluster config, can only declare:

- name: instance2
  parameters:
    sslEnabled: true
    keyStorePath: "{{ activemq_tls_keystore_dest }}"
    keyStorePassword: "{{ activemq_tls_keystore_password }}"

winstead of the wholly defined:

- name: instance2
  address: instance2
  port: "{{ activemq_port }}"
  parameters:
    tcpSendBufferSize: 1048576
    tcpReceiveBufferSize: 1048576
    protocols: CORE
    useEpoll: true
    sslEnabled: true
    keyStorePath: "{{ activemq_tls_keystore_dest }}"
    keyStorePassword: "{{ activemq_tls_keystore_password }}"

New role parameter:

Variable Description Default
activemq_cluster_iface The NIC name to be used for cluster IPv4 addresses (ie. 'eth0') default_ipv4

will be used to select the specified network interface name when gathering target host IP addresses during cluster formation. By default, default_ipv4, retains the behaviour of picking the NIC that ansible considers default.

Fix #62