I now have the very weird problem ansible-pull works perfectly fine as user ansible, but when doing the same from a systemd service fails without any useful logs apart from this:
systemd[1]: ansible-pull.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: ansible-pull.service: Failed with result 'exit-code'.
The unit file looks like this:
[Unit]
Description=Manage server configuration with ansible-pull
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/bin/ansible-pull -U https://example.com/ansible.git --clean --diff initiate.yml
User=ansible
[Install]
WantedBy=multi-user.target
Anyone have a clue what might be wrong, or how I could get more detailed logs or error messages?