Initial run of rsyslog playbook fails
Nobody has claimed this yet.
- Dominant language
- Jinja
- Stars
- 1.4k
- Forks
- 379
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 8
Description
Hi,
Initial run of rsyslog playbook fails against (target) freshly created Ubuntu 24.04 (server edition) with such error:
TASK [debops.debops.rsyslog : Create required system user] *******************************************************
task path: /home/ansible/.ansible/collections/ansible_collections/debops/debops/roles/rsyslog/tasks/main.yml:52
fatal: [vm-test]: FAILED! => {"changed": false, "msg": "usermod: user syslog is currently used by process 638\n", "name": "syslog", "rc": 8}
More verbose output:
fatal: [vm-test]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"append": true,
"authorization": null,
"comment": null,
"create_home": false,
"createhome": false,
"expires": null,
"force": false,
"generate_ssh_key": null,
"group": "syslog",
"groups": [
""
],
"hidden": null,
"home": "/home/syslog",
"local": null,
"login_class": null,
"move_home": false,
"name": "syslog",
"non_unique": false,
"password": null,
"password_expire_max": null,
"password_expire_min": null,
"password_expire_warn": null,
"password_lock": null,
"profile": null,
"remove": false,
"role": null,
"seuser": null,
"shell": "/bin/false",
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on vm-test",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": true,
"uid": null,
"umask": null,
"update_password": "always"
}
},
"msg": "usermod: user syslog is currently used by process 638\n",
"name": "syslog",
"rc": 8
}
Workaround is to stop syslog.socket temporary (which triggers rsyslog.service which starts PID 638 mentioned in usermod error message) via systemctl and then run rsyslog playbook which then succeeds and changes something via this particular task.
After that, additional runs of rsyslog playbook succeed without any workarounds (there are no changes detected anymore during this task), so it's only initial run that is affected.
Thanks!
Ansible controller:
- Ubuntu 22.04 (server edition)
- ansible-core 2.16.6
- ansible 9.5.1
- Debops 3.1.0 (installed via ansible-galaxy)
Target VM (vm-test):
- Ubuntu 24.04 (server edition)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with roles/rsyslog/tasks/main.yml at the reported task around line 52, then reproduce the initial rsyslog playbook run on a freshly created Ubuntu 24.04 target using the versions listed. Trace the interaction with syslog.socket and rsyslog.service; done means the first run completes without manually stopping syslog.socket and subsequent runs remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100