diff --git a/defaults/main.yml b/defaults/main.yml index a3c0540..0b3852e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,34 @@ --- # defaults file for deploy_haproxy +deploy_haproxy_deploy_method: host # deployment method, either host or docker +deploy_haproxy_version: latest + +# Options from the "default" config block in haproxy.cfg +# The default values here are usually set, but you can change any of them. +deploy_haproxy_global: + - log /dev/log local0 + - log /dev/log local1 notice + - stats socket {{ deploy_haproxy_socket }} level admin + - chroot {{ deploy_haproxy_chroot }} + - user {{ deploy_haproxy_user }} + - group {{ deploy_haproxy_group }} + - daemon + +deploy_haproxy_defaults: + - log global + - mode http + - option httplog + - option dontlognull + - timeout connect 5000 + - timeout client 5000 + - timeout server 5000 + +deploy_haproxy_frontend: + - name: default + options: + - mode http + - bind :80 + - default_backend default + +deploy_haproxy_backend: [] +deploy_haproxy_listen: [] diff --git a/meta/main.yml b/meta/main.yml index 8ec73d8..1afe075 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,12 +1,12 @@ --- # meta file for deploy_haproxy galaxy_info: - namespace: 'ednxzu' - role_name: 'deploy_haproxy' - author: 'Bertrand Lanson' - description: '' - license: 'license (BSD, MIT)' - min_ansible_version: '2.10' + namespace: "ednxzu" + role_name: "deploy_haproxy" + author: "Bertrand Lanson" + description: "Deploy HAProxy either directly or inside a docker container, on debian-based distributions" + license: "license (BSD, MIT)" + min_ansible_version: "2.10" platforms: - name: Ubuntu versions: @@ -17,7 +17,9 @@ galaxy_info: - bullseye - bookworm galaxy_tags: - - 'ubuntu' - - 'debian' + - "ubuntu" + - "debian" + - "haproxy" + - "docker" dependencies: [] diff --git a/tasks/prerequisites.yml b/tasks/prerequisites.yml new file mode 100644 index 0000000..e9fbb8a --- /dev/null +++ b/tasks/prerequisites.yml @@ -0,0 +1,2 @@ +--- +# task/prerequisites file for deploy_haproxy diff --git a/templates/haproxy.cfg.j2 b/templates/haproxy.cfg.j2 new file mode 100644 index 0000000..e69de29