-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy_serverledge.yml
More file actions
75 lines (59 loc) · 1.61 KB
/
deploy_serverledge.yml
File metadata and controls
75 lines (59 loc) · 1.61 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- name: Install Docker
hosts:
- sedge_Edge
- sedge_Cloud
tasks:
- name: "Install Docker using role"
include_role:
role: geerlingguy.docker
when: ansible_facts['distribution'] != "Amazon"
- name: "Install Docker on Amazon Linux"
block:
- name: Check for Docker
ansible.builtin.shell: "docker ps > /dev/null"
register: check
ignore_errors: True
- name: Install Docker
ansible.builtin.command: amazon-linux-extras install -y docker
become: yes
when: check.failed
- name: Start docker
ansible.builtin.command: systemctl start docker
become: yes
when: ansible_facts['distribution'] == "Amazon"
- name: Add user to docker group
ansible.builtin.user:
name: "{{ ansible_user }}"
state: present
append: yes
groups: docker
become: yes
- name: reset ssh connection
meta: reset_connection
when: groupupdated
- name: Install Etcd
hosts: sedge_Cloud[0]
roles:
- role: etcd
wipe_etcd: true
- name: Install ServerlEdge at the Edge
hosts: sedge_Edge
vars:
conf_template: edge-configuration.yaml.j2
roles:
- serverledge
- name: Install ServerlEdge in the Cloud
hosts: sedge_Cloud
vars:
conf_template: cloud-configuration.yaml.j2
roles:
- serverledge
- name: Install LB in the Cloud
hosts: sedge_Cloud[-1]
vars:
conf_template: lb-configuration.yaml.j2
tasks:
- include_role:
name: serverledge_lb
when: "{{ groups['sedge_Cloud'] | length | int }} > 1"