From b6ee8f76c2883a934bcf412722e0cf83830173c9 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 23 Jan 2023 17:33:53 +0100 Subject: Simplify fact gathering by using the cli instead of a webapi request --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 40166b2..004f678 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,23 @@ I wanted a role to install and configure syncthing for me and did not find an ex - the validation of host_vars which virtually no role in the wild ever does - the ability to manage an additional inventory file for devices which ansible cannot manage (like my phone) +## Dependencies + +This role relies on `doas` being installed and configured so that your ansible user can run the syncthing cli as the syncthing user. + +Here is an example of a `doas.conf` that works for the ansible user: +```yaml +permit nopass ansible as syncthing +``` + ## Role variables There is a single variable to specify in the `host_vars` of your hosts: `syncthing`. This is a dict that can contain the following keys: - address: optional string to specify how to connect to the server, must match the format `tcp://` or `tcp://`. Default value is *dynamic* which means a passive host. - shared: a mandatory dict describing the directories this host shares, which can contain the following keys: - name: a mandatory string to name the share in the configuration. It must match on all devices that share this folder. - - path: the path of the folder on the device. This can difer on each device sharing this data. - - peers: a list a strings. Each item should be either the ansible_hostname of another device, or a hostname from the `syncthing_data.yaml` file + - path: the path of the folder on the device. This can differ on each device sharing this data. + - peers: a list a strings. Each item should be either the `ansible_hostname` of another device, or a hostname from the `syncthing_data.yaml` file Configuring a host through its `host_vars` looks like this: ```yaml -- cgit v1.2.3