Skip to content

Commit

Permalink
Remove Vagrant testing and cleanup tests
Browse files Browse the repository at this point in the history
Now that we rely on molecule and don't rely on Vagrant anymore,
we can remove all the Vagrant bits and playbooks. To clarify,
tests playbooks were renamed.
  • Loading branch information
evrardjp committed Nov 4, 2020
1 parent b5032ee commit e29b993
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 159 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ The main variables are:
* keepalived_bind_on_non_local: This variable (defaulted to "False") determines whether the system that host keepalived will allow its apps to bind on non-local addresses. If you set it to true, this allows apps to bind (and start) even if they don't currently have the VIP for example.

Please check the examples for more explanations on how these dicts must be configured.
You can find an example playbook in this README, and other examples in `tests/`, including
examples on the variables configuration.

Other editable variables are listed in the defaults/main.yml. Please read the explanation there if you want to override them.
An example of a notification script is also given, in the files folder.
Expand Down
81 changes: 0 additions & 81 deletions Vagrantfile

This file was deleted.

52 changes: 0 additions & 52 deletions tests/deploy.yml

This file was deleted.

26 changes: 0 additions & 26 deletions tests/functional-test.yml

This file was deleted.

2 changes: 2 additions & 0 deletions tests/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
vrrp_nic: eth0
27 changes: 27 additions & 0 deletions tests/playbook-with-combined-vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# This is a standalone playbook to install keepalived
# on all nodes, having the first node the master, and
# the rest of nodes as fallback. It is showing an
# example of service, haproxy, to work with it.
# In your own environment, you should probably
# have your own group/host vars to define the content
# of keepalived_haproxy_combined_example.yml.
# Please note that keepalived_haproxy_combined_example.yml
# relies on calculations to have a single var file.
# You don't need that, it's just for convenience.
# To see a simpler example (with more detailed variables)
# check the other playbook: playbook-with-fine-grained-vars.yml
- name: Install keepalived
hosts: all
order: sorted
vars:
# All nodes will broadcast vrrp on eth0
# You should probably use group/host vars instead.
vrrp_nic: eth0
tasks:
- name: Include a single (combined) var file for all nodes
include_vars: "keepalived_haproxy_combined_example.yml"

- name: "Include ansible-keepalived"
include_role:
name: "ansible-keepalived"
24 changes: 24 additions & 0 deletions tests/playbook-with-fine-grained-vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
- name: Install keepalived on master node for haproxy use
hosts: master_node
# The VRRP NIC is defined in group/host vars
# You can define the equivalent of the include_vars there.
tasks:
- name: Include the variables for the master configuration
include_vars: "keepalived_haproxy_master_example.yml"

- name: "Include ansible-keepalived"
include_role:
name: "ansible-keepalived"

- name: Install keepalived on the rest of the nodes for haproxy use
hosts: all:!master_node
# VRRP NIC variable is defined in inventory
# You should probably fine grain the variables of keepalived per
# host instead of include_vars, but hey, this is just an example.
tasks:
- name: Include the var file for all the other nodes
include_vars: "keepalived_haproxy_backup_example.yml"

- name: "Include ansible-keepalived"
include_role:
name: "ansible-keepalived"

0 comments on commit e29b993

Please sign in to comment.