openstack-ansible/playbooks/roles/haproxy_server
Jimmy McCrory 9812d6db73 Fix deprecation warning for undefined variables
'with_' clauses are evaluated before 'when' clauses. In Ansible 1.9
the task is silently skipped when a variable within a 'with_' clause is
undefined, Ansible 2 provides a deprecation warning.

Separate the task deploying a user provided ssl cert and key into
two and check them individually for 'haproxy_user_ssl_cert' or
'haproxy_user_ssl_key' being defined.

Change-Id: I75367fe25d15d35ff60203b7c1d78437d613404d
2016-07-23 10:40:30 +00:00
..
defaults Update HAProxy for multi-OS support 2016-05-27 11:12:17 +00:00
files Update HAProxy for multi-OS support 2016-05-27 11:12:17 +00:00
handlers Added logging for haproxy to rsyslog 2015-10-27 20:01:17 +00:00
meta Update HAProxy for multi-OS support 2016-05-27 11:12:17 +00:00
tasks Fix deprecation warning for undefined variables 2016-07-23 10:40:30 +00:00
templates Fix HAProxy config and install version when ssl is disabled 2016-06-27 10:27:31 -04:00
vars Update HAProxy for multi-OS support 2016-05-27 11:12:17 +00:00
CONTRIBUTING.rst Convert existing roles into galaxy roles 2015-02-18 10:56:25 +00:00
LICENSE Convert existing roles into galaxy roles 2015-02-18 10:56:25 +00:00
README.rst Clean up references to haproxy_hosts in plays 2016-01-31 19:54:13 -06:00

OpenStack Haproxy Server

tags

openstack, galera, haproxy, cloud, ansible

category

*nix

Role for the installation and setup of haproxy

- name: Install haproxy
  hosts: haproxy
  user: root
  roles:
    - { role: "haproxy_server", tags: [ "haproxy-server" ] }
  vars:
    haproxy_service_configs:
      - service:
          hap_service_name: group_name
          hap_backend_nodes: "{{ groups['group_name'][0] }}"
          hap_backup_nodes: "{{ groups['group_name'][1:] }}"
          hap_port: 80
          hap_balance_type: http
          hap_backend_options:
            - "forwardfor"
            - "httpchk"
            - "httplog"