fastlorenzo / redelk-server

Ansible role to deploy RedELK server
BSD 3-Clause "New" or "Revised" License
18 stars 6 forks source link

redelk-server : Copying logstash config files from RedELK repository #3

Open truekonrads opened 2 years ago

truekonrads commented 2 years ago

This bombs out if ssh-key isn't added to the ssh-agent

TASK [redelk-server : Copying logstash config files from RedELK repository] ********************************************fatal: [redelk]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/bin/ssh -S none -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -C -o ControlMaster=auto -o ControlPersist=60s --rsync-path=sudo rsync --out-format=<<CHANGED>>%i %n%L /home/truekonrads/RedELK/elkserver/mounts/logstash-config/ ubuntu@3.0.51.223:/opt/redelk/mounts/logstash-config/", "msg": "Warning: Permanently added '3.0.51.223' (ECDSA) to the list of known hosts.\r\nubuntu@3.0.51.223: Permission denied (publickey).\r\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]\n", "rc": 255}
fastlorenzo commented 2 years ago

Should I maybe add this in the readme? I don't see how this could be easily fixed in the code

truekonrads commented 2 years ago

I was looking at an ansible location action to make the directory. In some other ansible projects I did, I had a task which validated if all required variables were set and if they weren't, I would error out with a descriptive message.