-
Notifications
You must be signed in to change notification settings - Fork 5
/
deploy.yml
70 lines (67 loc) · 1.41 KB
/
deploy.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
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
---
- hosts: cluster
vars:
ansible_python_interpreter: /usr/bin/python3
pre_tasks:
- service_facts:
register: svc_list
tags: always
# - set_vars:
# hosts_inventory: "{{ vars.hostvars }}"
tasks:
- name: Create /root/.docker directory
file:
path: /root/.docker
state: directory
mode: '0750'
owner: root
tags:
- docker
- name: Deploy /root/.docker/config.json
copy:
content: "{{ docker_config_json }}"
dest: /root/.docker/config.json
mode: '0600'
owner: root
tags:
- docker
when: docker_config_json
# - name: Install gotop
# unarchive:
# src: https://github.com/xxxserxxx/gotop/releases/download/v4.1.1/gotop_v4.1.1_linux_amd64.tgz
# dest: /usr/local/bin
# remote_src: yes
# - name: Install loki plugin to docker
# shell: "docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions; exit 0"
roles:
- role: core
tags:
- core
- base
- role: users
tags:
- users
- base
- role: node_exporter
tags:
- monitoring
- node-exporter
- role: lynis
tags:
- security
# - role: promtail
# tags:
# - monitoring
# - promtail
- role: docker-ce
tags:
- docker
# - role: restic
# tags:
# - backup
# - restic
# - role: s3cmd
# tags:
# - backup
- name: "{{ env }} Configure nomad"
import_playbook: nomad.yml