Revert "Use native OpenSSL module to generate `passkey.pem`"

This reverts commit 0dac5ea508.

Relying on pyOpenSSL is the Ansible way of doing things, but is
impractical and annoying for users.

`openssl` is easily available on most servers, even by default.
We'd better use that.
development
Slavi Pantaleev 6 years ago
parent 08321ea4bb
commit a9fae8e3b1

@ -4,8 +4,6 @@ The playbook can install and configure [matrix-appservice-irc](https://github.co
See the project's [documentation](https://github.com/TeDomum/matrix-appservice-irc/blob/master/HOWTO.md) to learn what it does and why it might be useful to you. See the project's [documentation](https://github.com/TeDomum/matrix-appservice-irc/blob/master/HOWTO.md) to learn what it does and why it might be useful to you.
The Appservice IRC bridge configuration using Ansible will require that you have `python-pyOpenSSL` installed on your local machine.
You'll need to use the following playbook configuration: You'll need to use the following playbook configuration:
```yaml ```yaml

@ -22,12 +22,13 @@
group: "{{ matrix_user_username }}" group: "{{ matrix_user_username }}"
when: "matrix_appservice_irc_enabled" when: "matrix_appservice_irc_enabled"
- name: Generate matrix-appservice-irc passkey if it doesn't exist - stat:
openssl_privatekey:
path: "{{ matrix_appservice_irc_base_path }}/passkey.pem" path: "{{ matrix_appservice_irc_base_path }}/passkey.pem"
size: 2048 register: irc_passkey_file
force: false
when: "matrix_appservice_irc_enabled" - name: Generate matrix-appservice-irc passkey if it doesn't exist
shell: /usr/bin/openssl genpkey -out {{ matrix_appservice_irc_base_path }}/passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:2048
when: "matrix_appservice_irc_enabled and irc_passkey_file.stat.exists == False"
- name: Ensure matrix-appservice-irc.service installed - name: Ensure matrix-appservice-irc.service installed
template: template:

Loading…
Cancel
Save