Browse Source

inventory: deleted-hosts is the list of hosts to be decommissioned

Fixes: main/infrastructure#235
keep-around/adb5ffcb8bcfaa0411558c9739072f647ec80a2d
Loïc Dachary 9 months ago
committed by Loic Dachary
parent
commit
b5bba4bcfd
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 27
      docs/user-guide.rst
  2. 3
      inventory/deleted.yml
  3. 4
      playbooks/bind/inventory/deleted.yml

27
docs/user-guide.rst

@ -447,8 +447,8 @@ The following are not useful if only relying on the ``service``
command above. They can however be helpful to run Ansible or OpenStack
manually.
Managing hosts
~~~~~~~~~~~~~~
Adding hosts
~~~~~~~~~~~~
The hosts (OpenStack virtual machines) are created automatically when
a service is provided. It is however possible to create a new host or
@ -479,7 +479,28 @@ SSH to a host:
enough --domain example.com ssh my-host
Deleting a host:
Removing hosts
~~~~~~~~~~~~~~
Every host is known to ``icinga``, ``bind`` and ``wazuh`` and it
should be deleted from these services before being removed.
* Add the host to the ``deleted-hosts`` group in ``~/.enough/example.com/inventory/all.yml``:
.. code::
---
deleted-hosts:
hosts:
some-host:
* Run the playbook:
.. code::
enough --domain example.com playbook
* Physically delete the host
.. code::

3
inventory/deleted.yml

@ -0,0 +1,3 @@
---
deleted-hosts:
hosts: {}

4
playbooks/bind/inventory/deleted.yml

@ -0,0 +1,4 @@
---
deleted-hosts:
hosts:
deleted-host:
Loading…
Cancel
Save