-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.BAK
75 lines (51 loc) · 1.7 KB
/
README.BAK
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
# Roles
## hosts
Configure a basic host file based on a list. Define the variable hostfile in your vault and add name/ip pairs for each host file you want defined.
Example:
```yaml
hostfile:
- name: rhel8-edge-1
ip: 10.0.133.1
- name: rhel8-edge-2
ip: 10.0.133.2
- name: elasticsearch
ip: 10.0.133.3
```
## rsyslog
Configure rsyslog to forward logs to an Elasticsearch instance. The following variables (with examples) determine how rsyslog is configured:
```yaml
rsyslog_elasticsearch_error_file: /var/lib/rsyslog/es-errors.log
rsyslog_elasticsearch_allow_unsigned_certs: "on"
elasticsearch_server: elasticsearch
elasticsearch_port: 31434
elasticsearch_user: elastic
elasticsearch_password: password
elasticsearch_search_index: rsyslog-index
```
# Running the Edge Playbook
## Clone Repository
Clone this repository as follows:
```shell
$ git clone https://github.com/sa-ne/rhel-edge.git
```
## Create an Inventory File of Edge Systems
First we need to create an inventory file (in this example at the root of the repository in `local/hosts.yaml`). An example is provided below:
```yaml
all:
hosts:
rhel8-edge-1:
ansible_host: 10.0.133.1
rhel8-edge-2:
ansible_host: 10.0.133.2
```
## Create a Vault
Create a vault (in this example at the root of the repository in `local/vault.yaml`) with the necessary to run each role.
```shell
$ ansible-vault create local/vault.yaml
```
## Running the Edge Playbook
Run the playbook as follows:
```shell
$ ansible-playbook --ask-vault-pass -i local/hosts.yaml -e @local/vault.yaml -u root edge.yaml
```
Each role is tagged appropriately so feel free to use `--tags` or `--skip-tags` for the desired effect (see `edge.yaml` for details).