I'm trying do this simple command but it keeps failing:
echo "secret_backend_command: /home/ec2-user/dd-get-secrets.py" >> /etc/datadog-agent/datadog.yaml"
I tried all the following:
- [ sh, -c, echo "secret_backend_command: /home/ec2-user/dd-get-secrets.py" >> /etc/datadog-agent/datadog.yaml ]
- 'sh -c "echo \"secret_backend_command: /home/ec2-user/dd-get-secrets.py\" >> /etc/datadog-agent/datadog.yaml"'
- sh -c "echo 'secret_backend_command: /home/ec2-user/dd-get-secrets.py' >> /etc/datadog-agent/datadog.yaml
any idea how to fix this quotes ?
note I tested with another file rather than datadpg.yaml because I'm getting Permission denied for this one.
examples I found in here didn't work