-
Notifications
You must be signed in to change notification settings - Fork 10
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
Mainly add the ability to create master ssh key if it doesn't exist #5
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
rsnapshot_master_ssh_key: id_rsa | ||
|
||
# User used by the rsnapshot master to connect on the configured host | ||
rsnapshot_slave_user: backupuser | ||
rsnapshot_slave_user: backupuserrsnapshot_slave_user_shell: /bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A carriage return is missing here
README.md
Outdated
rsnapshot_master_ssh_key: id_rsa | ||
|
||
# User used by the rsnapshot master to connect on the configured host | ||
rsnapshot_slave_user: backupuser | ||
rsnapshot_slave_user_password: Unencrypted_password #Use ansible vault to store it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer rsnapshot_slave_user_password: False
as a default value
tasks/config.yml
Outdated
user: | ||
name: "{{ rsnapshot_slave_user }}" | ||
password: "{{ rsnapshot_slave_user_password | password_hash('sha512') }}" | ||
when: rsnapshot_slave_user_password is defined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when: rsnapshot_slave_user_password
should be enough, as it is defined by default (even to False).
But this task is weird, SSH login on accounts with no password work very well with a SSH key, are you sure we need this? It depends on the SSH server configuration maybe?
While performing some tests, the I thought it was because it has no password and I use some os/sshd hardening roles. But to be honest, I didn't find the task which may have done the block. |
I just noticed that the
I don't understand why. I renamed the variable to I am missing something about Ansible I guess... |
README.md
Outdated
@@ -28,7 +28,7 @@ rsnapshot_master_ssh_key: id_rsa | |||
|
|||
# User used by the rsnapshot master to connect on the configured host | |||
rsnapshot_slave_user: backupuser | |||
rsnapshot_slave_user_password: False #If set, use an unencrypted value and store it in vault | |||
rsnapshot_slave_userpassword: False #If set, use an unencrypted value and store it in vault |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing the _
? rsnapshot_slave_user_password
was perfectly fine :) Your error was that there was no rsnapshot_slave_user_password
variable defined in defaults/main.yml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups sorry, didn't see your comment...
Strange, I don't know why... You can rename it with |
The conditional check 'rsnapshot_slave_user_password' failed. The error was: error while evaluating conditional (rsnapshot_slave_user_password): 'password' is undefined
FYI, I deployed in production with no password and backup didn't work. I found this error message in auth.log:
So I tried to define a password with If you have some idea, to help...
and even more strange
|
Currently the only fix I see, is to set But I don't understand why it works for |
Well, maybe Try this: rsnapshot_slave_user_passwd: without any value by default to see what happens. |
When provisioning inventories with master and slave, the slave roles fails if the master role hasn't been run on the master server because the ssh-key doesn't exist yet.
This PR introduces the (configurable) ability to create the missing ssh-key on the master if they don't exist.
It fixes also some deprecation warning and use YAML syntax everywhere.