--- # Generate locally because of more randomness & faster generation - name: Generate dh params locally command: openssl dhparam -out {{ dhparams_local_path | quote }} {{ dhparams_size }} args: creates: "{{ dhparams_local_path }}" delegate_to: localhost - name: Upload dh params to remote copy: src: "{{ dhparams_local_path }}" dest: "{{ dhparams_remote_path }}" owner: root group: root mode: u=rw,g=r,o=r