aboutsummaryrefslogtreecommitdiff
path: root/ansible/README.more.md
diff options
context:
space:
mode:
authorQuentin <quentin@dufour.io>2020-07-05 20:37:19 +0200
committerQuentin <quentin@dufour.io>2020-07-05 20:37:19 +0200
commit09878271f2a207ffb33c1f293dd26ee97cc6fff2 (patch)
treeee8d82b8640deed41acf13ab5cce94045ebc3081 /ansible/README.more.md
parentf427bcf5645d92604be3994496bf44bd93f5c7e3 (diff)
parentfaf39bbb282542efa237c39f4371918589508254 (diff)
downloadinfrastructure-09878271f2a207ffb33c1f293dd26ee97cc6fff2.tar.gz
infrastructure-09878271f2a207ffb33c1f293dd26ee97cc6fff2.zip
Merge pull request 'Network configuration' (#1) from network_config into master
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/deuxfleurs.fr/pulls/1
Diffstat (limited to 'ansible/README.more.md')
-rw-r--r--ansible/README.more.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/ansible/README.more.md b/ansible/README.more.md
new file mode 100644
index 0000000..0d0c607
--- /dev/null
+++ b/ansible/README.more.md
@@ -0,0 +1,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
+```
+