merge haproxy roles
This commit is contained in:
parent
f78e93e0ff
commit
ec9e8d3d8b
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
driver:
|
||||
name: docker
|
||||
privileged: true
|
||||
use_sudo: false
|
||||
|
||||
provisioner:
|
||||
name: ansible_playbook
|
||||
hosts: test-kitchen
|
||||
roles_path: ../
|
||||
ansible_verbose: true
|
||||
require_ansible_source: false
|
||||
require_chef_for_busser: false
|
||||
idempotency_test: true
|
||||
|
||||
platforms:
|
||||
- name: debian
|
||||
driver_config:
|
||||
image: evolix/ansible:2.2.1
|
||||
|
||||
suites:
|
||||
- name: default
|
||||
provisioner:
|
||||
name: ansible_playbook
|
||||
playbook: ./tests/test.yml
|
||||
|
||||
transport:
|
||||
max_ssh_sessions: 6
|
|
@ -1,5 +0,0 @@
|
|||
# haproxy-backports-preferences
|
||||
|
||||
Configure APT to prefer haproxy package from jessie-backports.
|
||||
|
||||
There is no variable, just a files copied to `/etc/apt/preferences.d/`.
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
- name: apt update
|
||||
apt:
|
||||
update_cache: yes
|
|
@ -1,19 +0,0 @@
|
|||
galaxy_info:
|
||||
author: Evolix
|
||||
description: Configure APT to prefer haproxy package from jessie-backports
|
||||
|
||||
issue_tracker_url: https://forge.evolix.org/projects/ansible-roles/issues
|
||||
|
||||
license: GPLv2
|
||||
|
||||
min_ansible_version: 2.2
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- jessie
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line.
|
||||
# Be sure to remove the '[]' above if you add dependencies
|
||||
# to this list.
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
- name: Prefer HAProxy package from jessie-backports
|
||||
copy:
|
||||
src: haproxy_preferences
|
||||
dest: /etc/apt/preferences.d/999-haproxy
|
||||
force: yes
|
||||
mode: "0640"
|
||||
notify: apt update
|
||||
|
||||
- meta: flush_handlers
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
- hosts: test-kitchen
|
||||
roles:
|
||||
- role: haproxy-backports-preferences
|
|
@ -8,7 +8,7 @@ Everything is in the `tasks/main.yml` file.
|
|||
|
||||
## Available variables
|
||||
|
||||
There is no variable.
|
||||
* `haproxy_jessie_backports` : on Debian Jessie, we can prefer v1.7 from backports (default: `False`)
|
||||
|
||||
## Configuration templates
|
||||
|
||||
|
|
3
haproxy/defaults/main.yml
Normal file
3
haproxy/defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
|
||||
haproxy_jessie_backports: False
|
|
@ -5,6 +5,10 @@
|
|||
state: installed
|
||||
tags:
|
||||
- haproxy
|
||||
- packages
|
||||
|
||||
- include: jessie_backports.yml
|
||||
when: ansible_distribution_release == "jessie" and haproxy_jessie_backports
|
||||
|
||||
- name: Install HAProxy package
|
||||
apt:
|
||||
|
@ -12,6 +16,7 @@
|
|||
state: installed
|
||||
tags:
|
||||
- haproxy
|
||||
- packages
|
||||
|
||||
- name: Copy HAProxy configuration
|
||||
template:
|
||||
|
@ -26,3 +31,4 @@
|
|||
notify: reload haproxy
|
||||
tags:
|
||||
- haproxy
|
||||
- config
|
||||
|
|
20
haproxy/tasks/packages_jessie_backports.yml
Normal file
20
haproxy/tasks/packages_jessie_backports.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
|
||||
- name: Prefer HAProxy package from jessie-backports
|
||||
copy:
|
||||
src: haproxy_apt_preferences
|
||||
dest: /etc/apt/preferences.d/999-haproxy
|
||||
force: yes
|
||||
mode: "0640"
|
||||
register: haproxy_apt_preferences
|
||||
tags:
|
||||
- haproxy
|
||||
- packages
|
||||
|
||||
- name: update apt
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: haproxy_apt_preferences | changed
|
||||
tags:
|
||||
- haproxy
|
||||
- packages
|
Loading…
Reference in a new issue