Skip to content
Snippets Groups Projects
  • Andrew Smith's avatar
    eeb535aa
    Add qdrouterd role for messaging infrastructure component · eeb535aa
    Andrew Smith authored
    Adding the role needed to run the qdrouterd as an infrastructure
    component which provides a messaging backend for the
    oslo.messaging AMQP 1.0 driver. The qdrouterd will provide direct
    messaging capabilities for the RPC messaging pattern in support
    of hybrid messaging deployments.
    
    Implements: blueprint qdrouterd-role
    Change-Id: I74c654b3c70f61f81c2c7efa87f076a62a4a2dd8
    eeb535aa
    History
    Add qdrouterd role for messaging infrastructure component
    Andrew Smith authored
    Adding the role needed to run the qdrouterd as an infrastructure
    component which provides a messaging backend for the
    oslo.messaging AMQP 1.0 driver. The qdrouterd will provide direct
    messaging capabilities for the RPC messaging pattern in support
    of hybrid messaging deployments.
    
    Implements: blueprint qdrouterd-role
    Change-Id: I74c654b3c70f61f81c2c7efa87f076a62a4a2dd8
site.yml 15.56 KiB
---
# NOTE(awiddersheim): Gather facts for all hosts as a
# first step since several plays below require them when
# building their configurations. The below 'gather_facts'
# set to 'false' is a bit confusing but this is to avoid
# Ansible gathering facts twice.
- name: Gather facts for all hosts
  hosts: all
  serial: '{{ serial|default("0") }}'
  gather_facts: false
  tasks:
    - setup:
  tags: always

# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The
# limit arg will cause the first play to gather facts only about that node,
# meaning facts such as IP addresses for rabbitmq nodes etc. will be undefined
# in the case of adding a single compute node.
# We don't want to add the delegate parameters to the above play as it will
# result in ((num_nodes-1)^2) number of SSHs when running for all nodes
# which can be very inefficient.
- name: Gather facts for all hosts (if using --limit)
  hosts: all
  serial: '{{ serial|default("0") }}'
  gather_facts: false
  tasks:
    - setup:
      delegate_facts: True
      delegate_to: "{{ item }}"
      with_items: "{{ groups['all'] }}"
      when:
        - (ansible_play_batch | length) != (groups['all'] | length)

- name: Detect openstack_release variable
  hosts: all
  gather_facts: false
  tasks:
    - name: Get current kolla-ansible version number
      local_action: command python -c "import pbr.version; print(pbr.version.VersionInfo('kolla-ansible'))"
      register: kolla_ansible_version
      changed_when: false
      when: openstack_release == "auto"

    - name: Set openstack_release variable
      set_fact:
        openstack_release: "{{ kolla_ansible_version.stdout }}"
      when: openstack_release == "auto"
  tags: always

- name: Apply role prechecks
  gather_facts: false
  hosts:
    - all
  roles:
    - role: prechecks
      when: action == "precheck"

- name: Apply role chrony
  gather_facts: false
  hosts:
    - chrony-server
    - chrony
  serial: '{{ serial|default("0") }}'
  roles:
    - { role: chrony,
        tags: chrony,
        when: enable_chrony | bool }

- name: Apply role collectd
  gather_facts: false