nusenu/ansible-relayor

Missing group on Debian 12

Closed this issue · 2 comments

Describe the bug
When running the playbook against an fresh Debian 12, it's unable to complete due to a change that creates an global group "users" instead of a group with the same name as the user.

failed: [1.1.1.1] (item=[{'ipv4': '1.1.1.1', 'ipv6': ''}, {'orport': 9000, 'dirport': 9001}]) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": [{"ipv4": "1.1.1.1", "ipv6": ""}, {"dirport": 9001, "orport": 9000}], "mode": "0755", "msg": "chgrp failed: failed to look up group _tor-1.1.1.1_9000", "owner": "_tor-1.1.1.1_9000", "path": "/var/lib/tor-instances/1.1.1.1_9000/keys", "size": 4096, "state": "directory", "uid": 994}

To Reproduce
Run playbook against a fresh Debian 12

Expected behavior
The playbook should create the desired group by itself
$ groupadd _tor-1.1.1.1_9000

Version information (please include the following information):

  • ansible version: ansible [core 2.16.1]
  • ansible-relayor version: master

Playbook information
tor_ContactInfo: "hello@example.com"
tor_signingkeylifetime_days: 90
tor_nickname: "example"
tor_maxPublicIPs: 1
tor_available_public_ipv4s:

  • "{{ ip_address }}"
    tor_RelayBandwidthRate: "4 Mbytes"
    tor_RelayBandwidthBurst: "6 Mbytes"
    tor_ports:
  • { orport: 9000, dirport: 9001 }

OS information
Target: Debian 12 (Bookworm)
Control: Ubuntu 22.04 (Jammy) on WSL 2

Debug information

(failed: [1.1.1.1] (item=[{'ipv4': '1.1.1.1', 'ipv6': ''}, {'orport': 9000, 'dirport': 9001}]) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": [{"ipv4": "1.1.1.1", "ipv6": ""}, {"dirport": 9001, "orport": 9000}], "mode": "0755", "msg": "chgrp failed: failed to look up group _tor-1.1.1.1_9000", "owner": "_tor-1.1.1.1_9000", "path": "/var/lib/tor-instances/1.1.1.1_9000/keys", "size": 4096, "state": "directory", "uid": 994})
nusenu commented

Thanks for your report.

So far I'm unable to reproduce this issue because the group is created by default on debian.

- name: Ensure per-instance tor users exist

Can you please add the complete ansible-playbook -vvv ... output as requested in the issue template?

Seems to be a vendor (hoster) specific problem with the supplied Debian 12 image.