This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
lec-playbook.yml
66 lines (51 loc) · 2.09 KB
/
lec-playbook.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
---
- name: "Installing Log Export Container with Ansible"
hosts: localhost
connection: local
tasks:
- name: Install Git
shell: apt install --yes git
- name: Clone Log Export Container
shell: git clone https://github.com/strongdm/log-export-container.git /opt/log-export-container/
- name: Update PATH variable
shell: export PATH=/home/fluent:$PATH
- name: Modify install-dependencies.sh permissions
file: dest=/opt/log-export-container/build-utils owner=root group=root mode=777 recurse=yes
- name: Configure Ubuntu
shell: /opt/log-export-container/build-utils/setup-os-ubuntu.sh
- name: Install Ubuntu packages
shell: /opt/log-export-container/build-utils/install-fluentd-dependencies-ubuntu.sh
- name: Install Ruby and Gem dependencies
shell: /opt/log-export-container/build-utils/install-ruby-dependencies.sh
args:
chdir: /opt/log-export-container
- name: Install StrongDM CLI
shell: /opt/log-export-container/build-utils/install-sdm-cli.sh
- name: Modify start.sh permissions
ansible.builtin.file:
path: /opt/log-export-container/start.sh
owner: root
group: root
mode: '777'
- name: Create /etc/sysconfig directory if it does not exist
ansible.builtin.file:
path: /etc/sysconfig
state: directory
mode: '777'
- name: Copy Log Export Container env file
ansible.builtin.copy:
src: env-file
dest: /etc/sysconfig/log-export-container
mode: '777'
- name: Copy Log Export Container service file
ansible.builtin.copy:
src: /opt/log-export-container/build-utils/log-export-container.service
dest: /etc/systemd/system/
mode: '777'
- name: Enable and start Log Export Container service
shell: systemctl enable log-export-container.service && systemctl start log-export-container.service
- name: Copy clean-up-credentials.sh script
ansible.builtin.copy:
src: /opt/log-export-container/build-utils/clean-up-credentials.sh
dest: /
mode: '777'