{"id":14984584,"url":"https://github.com/l-p/ansible-role-syncthing","last_synced_at":"2025-07-15T22:08:44.283Z","repository":{"id":141879849,"uuid":"68221009","full_name":"L-P/ansible-role-syncthing","owner":"L-P","description":"Install Syncthing on Debian-based distributions.","archived":false,"fork":false,"pushed_at":"2025-01-14T14:53:06.000Z","size":13,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T21:15:46.853Z","etag":null,"topics":["ansible","ansible-roles","syncthing"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/L-P.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-14T16:01:18.000Z","updated_at":"2025-01-21T14:04:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a67fcf8-cf53-497f-9e29-f9233a66ef75","html_url":"https://github.com/L-P/ansible-role-syncthing","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"35be9f3aab50f1e879c8285725a5c7801c682a64"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/L-P/ansible-role-syncthing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-P%2Fansible-role-syncthing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-P%2Fansible-role-syncthing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-P%2Fansible-role-syncthing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-P%2Fansible-role-syncthing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/L-P","download_url":"https://codeload.github.com/L-P/ansible-role-syncthing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L-P%2Fansible-role-syncthing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259695307,"owners_count":22897513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-roles","syncthing"],"created_at":"2024-09-24T14:09:18.074Z","updated_at":"2025-06-13T18:08:50.774Z","avatar_url":"https://github.com/L-P.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"ansible-role-syncthing\n======================\nInstall [Syncthing](https://syncthing.net/).\n\nRequirements\n------------\nA Debian-based distribution, root or _become_ on the remote host.\nLook at the [Syncthing documentation](https://docs.syncthing.net/users/firewall.html)\nto see what ports to open. The firewall configuration is not handled in this role.\n\nRole Variables\n--------------\nAll variables are optional.  \nThe only way to set Syncthing options is to edit its `config.xml` file, see the\n[Example Playbook](#example-playbook) section for details.\n\n```yaml\n# If the repository/key changes or you want to host your own, change these:\nsyncthing_apt_key_id:\nsyncthing_apt_key_url:\nsyncthing_apt_repository:\n\n# If you wish to change the syncthing user name or home:\nsyncthing_user:\nsyncthing_user_home:\n\n# Set this to false if you don't want to role to create and manage the user.\n# You will need to create the user specified in syncthing_user manually\n# _before_ using the role.\nsyncthing_manage_user:\n\n# Set this to true to get the Syncthing configuration from the remote host,\n# see the Example Playbook section.\nsyncthing_fetch_config:\n\n# Where the fetched files will be written.\nsyncthing_fetch_dir:\n\n# Configuration files content\nsyncthing_config_cert:\nsyncthing_config_key:\nsyncthing_config_https_cert:\nsyncthing_config_https_key:\nsyncthing_config_config:\n```\n\nDependencies\n------------\nNone.\n\nExample Playbook\n----------------\n```yaml\n# Install Syncthing\n- hosts: servers\n  roles:\n    - { role: l-p.syncthing }\n```\n\nThe Syncthing configuration is dynamic and edited at runtime using the GUI.  \nYou will need to get the configuration from the host and write it in the\n`syncthing_config_*` variables if you want to keep it safe and ensure it is the\nconfiguration you actually have on the server next time you run the role.\n\n**Failing to fetch the configuration before running the role again means that\nall new devices/folders/configuration will be erased from the remote host.**\n\nIf you don't set the `syncthing_config_*` variables nothing will be overwritten\nbut you will lose your configuration if your server sets itself on fire.\n\n```yaml\n# Get the generated configuration\n- hosts: servers\n  roles:\n    - { role: l-p.syncthing, syncthing_fetch_config: true }\n```\n\nYou can use `lookup` to read the files and set the variables:\n\n```yaml\nsyncthing_config_cert: \"{{lookup('file', 'files/{{ inventory_hostname }}/home/syncthing/.config/syncthing/cert.pem')}}\"\nsyncthing_config_key: \"{{lookup('file', 'files/{{ inventory_hostname }}/home/syncthing/.config/syncthing/key.pem')}}\"\nsyncthing_config_https_cert: \"{{lookup('file', 'files/{{ inventory_hostname }}/home/syncthing/.config/syncthing/https-cert.pem')}}\"\nsyncthing_config_https_key: \"{{lookup('file', 'files/{{ inventory_hostname }}/home/syncthing/.config/syncthing/https-key.pem')}}\"\nsyncthing_config_config: \"{{lookup('file', 'files/{{ inventory_hostname }}/home/syncthing/.config/syncthing/config.xml')}}\"\n```\n\nI advise to use `ansible-vault` to encrypt the keys, `lookup` will decrypt them\non the fly.\n\nLicense\n-------\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl-p%2Fansible-role-syncthing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl-p%2Fansible-role-syncthing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl-p%2Fansible-role-syncthing/lists"}