Skip to content

Commit

Permalink
fix ssh_password_salt
Browse files Browse the repository at this point in the history
  • Loading branch information
goffinet committed Oct 20, 2024
1 parent 1c62707 commit d47d603
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion http/ubuntu2004/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ autoinstall:
identity:
hostname: ubuntu2004
username: ubuntu
password: $6$rounds=4096$UQEUKs1yI0qGR7FE$PJm8BQYjfNSt6JKFmFEHnViOQ0I9UBSQHSZL7sX6rzn9D0twYRCCai007kB9x9L8GfWtEsNM6vYpUqxnkgFaj.
password: $6$rounds=4096$mB3ZauOM8/HIycgS$LwQeKlz2pQQvNtzOwSgLQG5kx3givTh2qzopLTD/svBPIRRKFi8u72Hi0yXIOD7lbVPOkMq0jGttggkUrntyB0
user-data:
disable_root: false
keyboard:
Expand Down
2 changes: 1 addition & 1 deletion http/ubuntu2204/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ autoinstall:
identity:
hostname: ubuntu2204
username: ubuntu
password: $6$rounds=4096$M.bhBB3TAnjTJV10$qcHxniWIE36zqyUm1Q1kPdYqWDMvdpic43yHIrpTYcWiM0ZRifHWELvyELsSZKTew5p7e8ukhT4al/.d57y3m/
password: $6$rounds=4096$mB3ZauOM8/HIycgS$LwQeKlz2pQQvNtzOwSgLQG5kx3givTh2qzopLTD/svBPIRRKFi8u72Hi0yXIOD7lbVPOkMq0jGttggkUrntyB0
user-data:
disable_root: false
keyboard:
Expand Down
3 changes: 3 additions & 0 deletions roles/build_packer_templates/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ boot_command: >-
{%- endif -%}
{%- endif -%}
ssh_password_salt: >-
mB3ZauOM8/HIycgS
ssh_password: >-
{%- if type == 'redhat' -%}
testtest
Expand Down
2 changes: 1 addition & 1 deletion roles/build_packer_templates/templates/user-data.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ autoinstall:
identity:
hostname: {{ label }}
username: {{ item.ssh_username | default('ubuntu') }}
password: {{ item.ssh_password | default(ssh_password) | password_hash('sha512', rounds=4096) }}
password: {{ item.ssh_password | default(ssh_password) | password_hash('sha512', salt=ssh_password_salt, rounds=4096) }}
user-data:
disable_root: false
keyboard:
Expand Down

0 comments on commit d47d603

Please sign in to comment.