Newer
Older
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
76
77
78
79
80
81
# Configuration
## SSH
The Ansible deployment will be done through SSH, so you must be able to connect to all the involved hosts by using SSH public key authentication.
To create a key pair:
```sh
ssh-keygen -t ed25519
```
Copy the public key to the root account of all involved hosts:
```
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@<SERVER-X>
```
You can also add the content of `~/.ssh/id_ed25519.pub` to `~/.ssh/authorized_keys` of the `root` account of destination hosts.
## Inventory
Move to ansible directory
```
cd ./ansible
```
Make a copy of the `example` inventory and eventually customize it with the customer informations.
```sh
# for standard deployment
cp -r inventories/example inventories/customer
# for HA deployement
cp -r inventories/example-ha inventories/customer
```
There are also inventories for local deployment, you can use one of these lines:
```sh
cp -r inventories/local-full inventories/customer
cp -r inventories/local-mediaserver inventories/customer
cp -r inventories/local-mediaworker inventories/customer
```
### Hosts and Groups
Edit `inventories/customer/hosts` to match your inrastructure.
### Variables
If you use a local-\* inventory, copy `inventories/customer/host_vars/localhost.dist.yml` to `inventories/customer/host_vars/localhost.yml`.
You **must at least** configure:
- `skyreach_system_key` values in `inventories/customer/host_vars/<host>.yml`
If you want to set/override a variable for:
- all: `inventories/my-customer/group_vars/all.yml`.
- a group:`inventories/my-customer/group_vars/<group>.yml`.
- a host: `inventories/my-customer/host_vars/<host>.yml`.
If hosts have a proxy you have to set the proxy settings in the inventory variables, in `inventories/mcustomer/group_vars/all.yml`:
```yaml
proxy_http: http://proxy.my-customer.net:3128
proxy_https: http://proxy.my-customer.net:3128
```
### Verify
Make sure Ansible can connect to all the hosts:
```sh
ansible -i inventories/customer -m ping all
mymediaserver | SUCCESS => {
"changed": false,
"ping": "pong"
}
[...]
```