1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_sshd.git synced 2024-08-16 11:59:49 +02:00

add option 'generate_modern_ssh_keys | bool'

This commit is contained in:
Lilian Roller 2019-11-14 11:12:47 +01:00
parent 22f18c6928
commit b22c0597aa
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
3 changed files with 17 additions and 7 deletions

View file

@ -27,5 +27,7 @@ use_diffie_hellman_group_exchange_sha256: false
use_aes256_ctr: false use_aes256_ctr: false
use_hmac_sha2_512: false use_hmac_sha2_512: false
generate_modern_ssh_keys: true
# version check for this role? # version check for this role?
submodules_versioncheck: true submodules_versioncheck: true

View file

@ -41,7 +41,9 @@
creates: 'ssh_host_ecdsa_key.pub' creates: 'ssh_host_ecdsa_key.pub'
notify: notify:
- restart ssh - restart ssh
when: generate_ecdsa_too|bool when:
- generate_ecdsa_too | bool
- generate_modern_ssh_keys | bool
- name: Generate new ed25519 ssh host key pair if necessary - name: Generate new ed25519 ssh host key pair if necessary
become: yes become: yes
@ -51,7 +53,9 @@
creates: 'ssh_host_ed25519_key.pub' creates: 'ssh_host_ed25519_key.pub'
notify: notify:
- restart ssh - restart ssh
when: ansible_distribution_release != 'wheezy' when:
- ansible_distribution_release != 'wheezy'
- generate_modern_ssh_keys | bool
- name: Remove unwanted host keys - name: Remove unwanted host keys
become: yes become: yes
@ -66,6 +70,7 @@
when: when:
- generate_ecdsa_too | bool - generate_ecdsa_too | bool
- ansible_distribution_release != 'wheezy' - ansible_distribution_release != 'wheezy'
- generate_modern_ssh_keys | bool
- name: Remove unwanted host keys - name: Remove unwanted host keys
become: yes become: yes
@ -81,6 +86,7 @@
when: when:
- not generate_ecdsa_too | bool - not generate_ecdsa_too | bool
- ansible_distribution_release != 'wheezy' - ansible_distribution_release != 'wheezy'
- generate_modern_ssh_keys | bool
- name: make sure the correct keys are available - name: make sure the correct keys are available
file: file:
@ -96,6 +102,7 @@
when: when:
- not generate_ecdsa_too | bool - not generate_ecdsa_too | bool
- ansible_distribution_release != 'wheezy' - ansible_distribution_release != 'wheezy'
- generate_modern_ssh_keys | bool
- name: make sure the correct keys are available except ecdsa - name: make sure the correct keys are available except ecdsa
file: file:
@ -110,3 +117,4 @@
when: when:
- generate_ecdsa_too | bool - generate_ecdsa_too | bool
- ansible_distribution_release != 'wheezy' - ansible_distribution_release != 'wheezy'
- generate_modern_ssh_keys | bool

View file

@ -1,3 +1,3 @@
--- ---
playbook_version_number: 2050 # should be over ninethousand playbook_version_number: 2051 # should be over ninethousand
playbook_version_path: 'role-sshd_chaos-bodensee_github.com.version' playbook_version_path: 'role-sshd_chaos-bodensee_github.com.version'