install through most of config setup

This commit is contained in:
Andrew Smith 2018-05-21 15:41:30 -04:00
parent 7cfe3675f2
commit a0b0733be0
6 changed files with 88 additions and 37 deletions

View File

@ -1,2 +1,43 @@
---
# defaults file for ansible-qdrouterd
# Copyright 2018, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# defaults file for ansible-qdrouterd
# Package install state, options are 'present' and 'latest'
qdrouterd_package_state: "latest"
# Inventory group containg the hosts for the mesh
qdrouterd_host_group: "qdrouterd_all"
# Qdrouterd Service config
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 router config
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: 31459
qdrouterd_listener_auth_peer: "no"
qdrouterd_listener_sasl_mech: "ANONYMOUS"
qdrouterd_irl_addr: 0.0.0.0
qdrouterd_irl_port: 31460
qdrouterd_mode: "standalone"
qdrouterd_worker_threads: 4
qdrouterd_sasl_conf_path: "/etc/sasl2/"
qdrouterd_sasl_conf_file: "/etc/sasl2/qdrouterd.conf"
qdrouterd_log_module: "DEFAULT"
qdrouterd_log_enable: "info+"

View File

@ -26,6 +26,26 @@
tags:
- qdrouterd-config
- name: Create the log directory
file:
path: "/var/lib/qdrouterd/"
state: "directory"
group: "qdrouterd"
owner: "qdrouterd"
recurse: true
tags:
- qdrouterd-config
- name: Create the log directory
file:
path: "/var/log/qdrouterd/"
state: "directory"
group: "qdrouterd"
owner: "qdrouterd"
recurse: true
tags:
- qdrouterd-config
- include: qdrouterd_restart.yml
static: no
when: qdrouterd_config_changed|changed

View File

@ -12,10 +12,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Create the local directories
file:
path: "/etc/qpid-dispatch/"
path: "{{ qdrouterd_etc_conf_path }}"
state: "directory"
group: "root"
owner: "root"
@ -23,22 +23,4 @@
tags:
- qdrouterd-config
- name: Create the log directory
file:
path: "/var/lib/qdrouterd/"
state: "directory"
group: "qdrouterd"
owner: "qdrouterd"
recurse: true
tags:
- qdrouterd-config
- name: Create the log directory
file:
path: "/var/log/qdrouterd/"
state: "directory"
group: "qdrouterd"
owner: "qdrouterd"
recurse: true
tags:
- qdrouterd-config

View File

@ -1,19 +1,28 @@
router {
mode: standalone
id: Router.A
workerThreads: 4
saslConfigPath: /etc/sasl2
saslConfigName: qdrouterd
mode: {{ qdrouterd_mode }}
id: {{ ansible_hostname }}
workerThreads: {{ qdrouterd_host_count }}
saslConfigPath: {{ qdrouterd_sasl_conf_path }}
saslConfigName: {{ qdrouterd_service_name }}
}
listener {
host: {{ ansible_hostname }}
port: {{ qdrouterd_port }}
host: {{ qdrouterd_listener_addr }}
port: {{ qdrouterd_listener_port }}
role: normal
authenticatePeer: no
authenticatePeer: {{ qdrouterd_listener_auth_peer }}
saslMechanisms: {{ qdrouterd_listener_sasl_mech }}
}
{% if qdrouterd_host_count > '1' %}
listener {
host: {{ qdrouterd_irl_addr }}
port: {{ qdrouterd_irl_port }}
role: inter-router
}
{% endif %}
address {
prefix: unicast
distribution: closest
@ -52,7 +61,8 @@ address {
}
log {
module: DEFAULT
enable: info+
output: /var/log/qdrouterd/qdrouterd.log
module: {{ qdrouterd_log_module }}
enable: {{ qdrouterd_log_enable }}
timestamp: true
output: {{ qdrouterd_log_file }}
}

View File

@ -1,3 +1,2 @@
---
# vars file for ansible-qdrouterd
qdrouterd_port: 5672

View File

@ -20,10 +20,9 @@ qdrouterd_distro_packages:
- qpid-dispatch-router
- qpid-dispatch-tools
qdrouterd_package_state: "latest"
qdrouterd_etc_conf_file: "/etc/qpid-dispatch/qdrouterd.conf"
qdrouterd_sasl_conf_file: "/etc/sasl2/qdrouterd.conf"
qdrouterd_service_name: "qdrouterd"
_qdrouterd_etc_conf_path: "/etc/qpid-dispatch/"
_qdrouterd_etc_conf_file: "/etc/qpid-dispatch/qdrouterd.conf"
_qdrouterd_service_name: "qdrouterd"
epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
epel_repo_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"