1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_weechat.git synced 2024-08-16 13:09:48 +02:00

start creating ssh key creation for custom config

This commit is contained in:
L3D 2020-03-12 04:01:23 +01:00 committed by L3D
parent f9cd418da3
commit 42cd710101
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
3 changed files with 20 additions and 1 deletions

View file

@ -61,7 +61,7 @@ weechat:
weechat: weechat:
user: "{{ ansible_user_id }}" user: "{{ ansible_user_id }}"
``` ```
+ the user to use weechat with. This value is used in the ``autostart`` task and the ``{{ weechat.home_directory }}`` variable + the user to use weechat with. This value is used in the ``autostart`` task, the ``custom_config`` task and the ``{{ weechat.home_directory }}`` variable
```yaml ```yaml
weechat: weechat:

View file

@ -0,0 +1,16 @@
---
- name: create ssh key pair (if needed)
become: true
become_user: "{{ weechat.user }}"
openssh_keypair:
path: "{{ weechat.home_directory }}/../.ssh/id_ed25519"
type: ed25519
register: ssh_key_pair
when: weechat.custom_config.gen_ssh_key_pair | bool
- name: print ssh public key to user
pause:
prompt: "Your ssh public key:\n\n{{ ssh_key_pair.public_key }}\n\n"
when:
- weechat.custom_config.gen_ssh_key_pair | bool
- ssh_key_pair.changed

View file

@ -9,6 +9,9 @@
- include_tasks: "install-{{ ansible_os_family|lower }}.yml" - include_tasks: "install-{{ ansible_os_family|lower }}.yml"
when: weechat.install | bool when: weechat.install | bool
- include_tasks: configure_custom_config.yml
when: weechat.use_custom_config | bool
- include_tasks: configure_plugins.yml - include_tasks: configure_plugins.yml
when: weechat.install_plugins | bool when: weechat.install_plugins | bool