Skip to content

Commit

Permalink
[BUGFIX] Fail task Set password for backup user if provided
Browse files Browse the repository at this point in the history
The conditional check 'rsnapshot_slave_user_password' failed. The error was: error while evaluating conditional (rsnapshot_slave_user_password): 'password' is undefined
  • Loading branch information
mickaelperrin committed May 23, 2018
1 parent 4152d6b commit 82430b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
rsnapshot_slave_user_shell: /bin/bash

# Allow rsnapshot client to create master user and ssh-keygen if it doesn't exists
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,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_userpassword: False
rsnapshot_slave_user_shell: /bin/bash

# Allow rsnapshot client to create master user and ssh-keygen if it doesn't exists
Expand Down
4 changes: 2 additions & 2 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- name: Set password for backup user if provided
user:
name: "{{ rsnapshot_slave_user }}"
password: "{{ rsnapshot_slave_user_password | password_hash('sha512') }}"
when: rsnapshot_slave_user_password
password: "{{ rsnapshot_slave_userpassword | password_hash('sha512') }}"
when: rsnapshot_slave_userpassword

- name: Sudo configuration for the backup system user
template:
Expand Down

0 comments on commit 82430b9

Please sign in to comment.