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:
parent
f9cd418da3
commit
42cd710101
3 changed files with 20 additions and 1 deletions
|
@ -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:
|
||||||
|
|
16
tasks/configure_custom_config.yml
Normal file
16
tasks/configure_custom_config.yml
Normal 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
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue