ansible-syncthing icon indicating copy to clipboard operation
ansible-syncthing copied to clipboard

how to generate device id automatically ?

Open changchichung opened this issue 2 years ago • 2 comments

in group_vars , you define device id

device_moto:
  - id: "0000000-0000000-0000000-0000000-0000000-0000000-0000000-0000000"
    name: "tapik"

but can you get the id without manually config in devices ? when the node is a whole new device ( never install syncthing before ) , I don't know how to generate the id .

changchichung avatar Jul 05 '22 15:07 changchichung

In this case, the id is used to connect devices that are not managed by ansible

le9i0nx avatar Aug 01 '22 17:08 le9i0nx

role_syncthing_data:
  folders:
    - inventory_hosts: '{{ groups.homes }}'
      path: '/home/user/crypt/'
      id: 'crypt'

this config will set up the crypt folder on the homes group at the specified path and read the id of all devices and link them.

le9i0nx avatar Aug 01 '22 17:08 le9i0nx