-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuclalib_swarmstackdeploy.yml
36 lines (33 loc) · 1.38 KB
/
uclalib_swarmstackdeploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
###############################################################################
# Playbook for Deploying a Stack into a Docker Swarm Cluster
# ----------------------------------------------------------
#
# This ansible play is meant to be run against an existing Docker Swarm
# Manager node.
#
# It is expected that your inventory file contains a unique group name for
# the project/service you wish you deploy into the swarm cluster.
#
# For example, the inventory.ini should contain a group stanza titled
# [swarm_service_prod] containing the swarm manager node DNS name.
#
# It is also expected that you have your group_vars configured to put in place
# the docker-compose.yml file, and if necessary the compose env file.
#
# Sample command-line execution of this play is (assuming you are in the
# /etc/ansible directory):
#
# To run this play to deploy the [swarm_service_prod] stack:
# ansible-playbook -i inventory.ini plays/uclalib_swarmstackdeploy.yml -e rhel_inventory_host_group=swarm_service_prod -v
#
###############################################################################
- name: uclalib_swarmstackdeploy.yml
become: yes
become_method: sudo
hosts: "{{ rhel_inventory_host_group }}"
vars_files:
- ../group_vars/{{ rhel_inventory_host_group }}/main.yml
- ../group_vars/{{ rhel_inventory_host_group }}/main.vault.yml
roles:
- { role: uclalib_role_swarmdeploy }