-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH Issues – a bit more documentation would be nice #36
Comments
@vardumper agree it would be nice to have some documentation advising against setting the ansible_ssh_private_key_file value in the README. I'm not the best at node.js but it looks like the key is copied to a file called ".ansible_key" so you might be able to set ansible_ssh_private_key_file to that but easier to just omit it. if (key) {
const keyFile = ".ansible_key"
fs.writeFileSync(keyFile, key + os.EOL, { mode: 0600 })
core.saveState("keyFile", keyFile)
cmd.push("--key-file")
cmd.push(keyFile)
} |
EDIT: I solved it I can't connect :/ I tried both suggestions and I got a permission denied error. I stored the private key string in an action secret and added it to the "key" variable. Is there anything I'm missing?
|
@MasteringBOX could you please elaborate more how you have fixed this? I'm facing the similar issue, looks like action is ignoring the value of |
Hi @jozef-valko, I don't fully remember, it was something silly. By the way, after configuring this I ended up using Github actions directly, they are pretty straightforward and they will deploy faster. |
@MasteringBOX I made it work, it was issue on my side with SSH keys and config. After generating new SSH keypair and setting parameters correctly:
and setting |
Don't forget to set the ssh user |
I will gladly review PRs improving the documentation. |
Solved this issue by creating a self hosted runner |
Inspired by comments on dawidd6/action-ansible-playbook#36
In order to make sure ansible has access to the boxes, I needed to remove the following line form my inventory file. Also I had to comment out the known_hosts setting.
I had the line in all:vars section
After removing it, the playbook action could connect.
The text was updated successfully, but these errors were encountered: