Skip to content

Commit

Permalink
Consistency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Apr 15, 2016
1 parent 5d9656b commit 2873ad7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 22 deletions.
8 changes: 0 additions & 8 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
role = File.basename(File.expand_path(File.dirname(__FILE__)))

boxes = [
{
:name => "ubuntu-1004",
:box => "opscode-ubuntu-10.04",
:url => "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-10.04_chef-provisionerless.box",
:ip => '10.0.0.10',
:cpu => "50",
:ram => "256"
},
{
:name => "ubuntu-1204",
:box => "opscode-ubuntu-12.04",
Expand Down
1 change: 0 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- lucid
- precise
- trusty
galaxy_tags:
Expand Down
50 changes: 38 additions & 12 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,39 @@
fail:
msg: "HAProxy version {{ haproxy_version }} is not supported"
when: haproxy_version not in haproxy_versions_supported
tags: [configuration, haproxy, haproxy-check-version-support]
tags:
- configuration
- haproxy
- haproxy-check-version-support

- name: add repository from PPA and install its signing key
apt_repository:
repo: "{{ haproxy_ppa }}"
update_cache: true
tags: [configuration, haproxy, haproxy-add-repository]
tags:
- configuration
- haproxy
- haproxy-add-repository

- name: install dependencies
apt:
name: "{{ item }}"
state: latest
with_items: haproxy_dependencies
tags: [configuration, haproxy, haproxy-dependencies]
with_items: "{{ haproxy_dependencies }}"
tags:
- configuration
- haproxy
- haproxy-dependencies

- name: install
apt:
name: "{{ item }}"
state: latest
with_items: haproxy_install
tags: [configuration, haproxy, haproxy-install]
with_items: "{{ haproxy_install }}"
tags:
- configuration
- haproxy
- haproxy-install

- name: create certificate files directories
file:
Expand All @@ -33,8 +45,12 @@
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: 0750
with_items: haproxy_ssl_map
tags: [configuration, haproxy, haproxy-configuration, haproxy-configuration-ssl]
with_items: "{{ haproxy_ssl_map }}"
tags:
- configuration
- haproxy
- haproxy-configuration
- haproxy-configuration-ssl

- name: copy certificate files
copy:
Expand All @@ -43,9 +59,13 @@
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: "{{ item.mode | default('0640') }}"
with_items: haproxy_ssl_map
with_items: "{{ haproxy_ssl_map }}"
notify: restart haproxy
tags: [configuration, haproxy, haproxy-configuration, haproxy-configuration-ssl]
tags:
- configuration
- haproxy
- haproxy-configuration
- haproxy-configuration-ssl

- name: update configuration file
template:
Expand All @@ -56,11 +76,17 @@
mode: 0640
validate: 'haproxy -f %s -c'
notify: restart haproxy
tags: [configuration, haproxy, haproxy-configuration]
tags:
- configuration
- haproxy
- haproxy-configuration

- name: start and enable service
service:
name: haproxy
state: started
enabled: true
tags: [configuration, haproxy, haproxy-start-enable-service]
tags:
- configuration
- haproxy
- haproxy-start-enable-service
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ haproxy_versions_supported:
- 1.5
- 1.6

haproxy_ppa: 'ppa:vbernat/haproxy-{{ haproxy_version }}'
haproxy_ppa: "ppa:vbernat/haproxy-{{ haproxy_version }}"
haproxy_dependencies:
- haproxy

0 comments on commit 2873ad7

Please sign in to comment.