-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from Oefenweb/add-support-for-haproxy-map
Add support for HAProxy map
- Loading branch information
Showing
10 changed files
with
121 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,6 @@ haproxy_backend: [] | |
|
||
# user-lists section | ||
haproxy_userlists: [] | ||
|
||
# ACL files | ||
haproxy_acl_files: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# tasks file for haproxy | ||
--- | ||
- name: acl | create directories | ||
file: | ||
path: "{{ item.dest | dirname }}" | ||
state: directory | ||
owner: "{{ item.owner | default('root') }}" | ||
group: "{{ item.group | default('root') }}" | ||
mode: 0750 | ||
with_items: "{{ haproxy_acl_files }}" | ||
tags: | ||
- haproxy-acl-create-directories | ||
|
||
- name: acl | update files | ||
template: | ||
src: etc/haproxy/acl.j2 | ||
dest: "{{ item.dest }}" | ||
owner: "{{ item.owner | default('root') }}" | ||
group: "{{ item.group | default('root') }}" | ||
mode: "{{ item.mode | default('0640') }}" | ||
with_items: "{{ haproxy_acl_files }}" | ||
notify: restart haproxy | ||
tags: | ||
- haproxy-acl-update-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# tasks file for haproxy | ||
--- | ||
- name: certificates | create directories | ||
file: | ||
path: "{{ item.dest | dirname }}" | ||
state: directory | ||
owner: "{{ item.owner | default('root') }}" | ||
group: "{{ item.group | default('root') }}" | ||
mode: 0750 | ||
with_items: "{{ haproxy_ssl_map }}" | ||
tags: | ||
- haproxy-certificates-create-directories | ||
|
||
- name: certificates | copy files | ||
copy: | ||
src: "{{ item.src }}" | ||
dest: "{{ item.dest }}" | ||
owner: "{{ item.owner | default('root') }}" | ||
group: "{{ item.group | default('root') }}" | ||
mode: "{{ item.mode | default('0640') }}" | ||
with_items: "{{ haproxy_ssl_map }}" | ||
notify: restart haproxy | ||
tags: | ||
- haproxy-certificates-copy-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# tasks file for haproxy | ||
--- | ||
- name: configuration | update file | ||
template: | ||
src: etc/haproxy/haproxy.cfg.j2 | ||
dest: /etc/haproxy/haproxy.cfg | ||
owner: root | ||
group: root | ||
mode: 0640 | ||
validate: 'haproxy -f %s -c' | ||
notify: restart haproxy | ||
tags: | ||
- haproxy-configuration-update-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# tasks file for haproxy | ||
--- | ||
- name: install | add repository from PPA and install its signing key | ||
apt_repository: | ||
repo: "{{ haproxy_ppa }}" | ||
update_cache: true | ||
tags: | ||
- haproxy-install-add-repository | ||
|
||
- name: install | dependencies | ||
apt: | ||
name: "{{ item.name }}" | ||
state: "{{ item.state }}" | ||
with_items: "{{ haproxy_dependencies }}" | ||
tags: | ||
- haproxy-install-dependencies | ||
|
||
- name: install | additional | ||
apt: | ||
name: "{{ item }}" | ||
state: "{{ apt_install_state | default('latest') }}" | ||
with_items: "{{ haproxy_install }}" | ||
tags: | ||
- haproxy-install-additional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# {{ ansible_managed }} | ||
|
||
{% for content in item.content | default([]) %} | ||
{{ content }} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters