From 0f5cc78d913bfa907b125db12eed9420acbc0f23 Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Fri, 20 Jun 2025 09:16:08 -0400 Subject: [PATCH] syncthing install playbook --- playbooks/syncthing/install.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 playbooks/syncthing/install.yml diff --git a/playbooks/syncthing/install.yml b/playbooks/syncthing/install.yml new file mode 100644 index 0000000..f3333bb --- /dev/null +++ b/playbooks/syncthing/install.yml @@ -0,0 +1,31 @@ +- name: Installs syncthing on an Debian/RPM host + hosts: t440,baxter + become: true + tasks: + ## Get the package downloaded + - name: installs syncthing on Debian + ansible.builtin.apt: + name: syncthing + state: present + when: ansible_os_family == "Debian" + + - name: setup the extra repositories on linux(epel9) + ansible.builtin.shell: | + subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms + dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == "9" + + - name: install syncthing on RedHat + ansible.builtin.dnf: + name: syncthing + state: present + when: ansible_os_family == "RedHat" + + ## start the systemd user service and setup credentials + - name: print follow-on instructions + ansible.builtin.debug: + msg: Start the @user service, and setup syncthing with device IDs + +