aboutsummaryrefslogtreecommitdiff
path: root/os_config/README.more.md
blob: 0d0c60787d717e46faa898a9127900c6be0cd88c (plain) (blame)
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
## Provisionning

 1. Need a public IP address
 2. Deploy Debian sid/buster
 3. Add a DNS entry like xxxx.machine.deuxfleurs.fr A 0.0.0.0 in Cloudflare + Havelock
 4. Setup the fqdn in /etc/hosts (127.0.1.1 xxxx.machine.deuxfleurs.fr)
 5. Switch the SSH port to the port 110
 6. Add the server to the ./production file 
 7. Reboot machine
 8. Deploy Ansible
 9. Check that everything works as intended
 10. Update NS 1.cluster.deuxfleurs.fr

## Useful commands

Show every variables collected by Ansible for a given host:

```
ansible -i production villequin.machine.deuxfleurs.fr -m setup
```

Run playbook for only one host:

```
ansible-playbook -i production --limit villequin.machine.deuxfleurs.fr site.yml
```

Dump hostvars:

```
ansible -m debug villequin.machine.deuxfleurs.fr -i ./production -a "var=hostvars"
```

Deploy only one tag:

```
ansible-playbook -i production site.yml --tags "container"
```

Redeploy everything:

```
ansible-playbook -i production site.yml
```

Upgrade packages and force overwirte to fix bad packing done by GlusterFS:

```
apt-get -o Dpkg::Options::="--force-overwrite"  dist-upgrade -y
```