2020-03-11 20:51:00 +01:00
|
|
|
---
|
2023-03-01 21:27:09 +01:00
|
|
|
- name: Create weechat directory
|
2020-03-11 21:08:00 +01:00
|
|
|
become: true
|
2022-04-06 00:15:06 +02:00
|
|
|
ansible.builtin.file:
|
2021-05-27 16:18:04 +02:00
|
|
|
path: "{{ weechat__home_directory }}/.weechat"
|
2020-03-11 21:08:00 +01:00
|
|
|
state: directory
|
2021-05-27 16:18:04 +02:00
|
|
|
owner: "{{ weechat__user }}"
|
2020-03-11 21:08:00 +01:00
|
|
|
mode: "0750"
|
|
|
|
|
2023-03-01 21:27:09 +01:00
|
|
|
- name: Create weechat plugins directory
|
2020-03-11 21:08:00 +01:00
|
|
|
become: true
|
2022-04-06 00:15:06 +02:00
|
|
|
ansible.builtin.file:
|
2021-05-27 16:18:04 +02:00
|
|
|
path: "{{ weechat__home_directory }}/.weechat/{{ item.value }}/autoload"
|
2020-03-11 21:08:00 +01:00
|
|
|
state: directory
|
2021-05-27 16:18:04 +02:00
|
|
|
owner: "{{ weechat__user }}"
|
2020-03-11 21:08:00 +01:00
|
|
|
mode: "0750"
|
|
|
|
with_dict: "{{ weechat_plugin_languages }}"
|
|
|
|
|
2023-03-01 21:27:09 +01:00
|
|
|
- name: Download weechat plugins
|
2022-04-06 00:15:06 +02:00
|
|
|
ansible.builtin.get_url:
|
2020-03-11 20:51:00 +01:00
|
|
|
url: 'https://weechat.org/files/scripts/{{ item }}'
|
2023-03-01 21:27:09 +01:00
|
|
|
dest: "{{ weechat__home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.', 1)[-1]] }}/{{ item }}"
|
2022-04-06 00:15:06 +02:00
|
|
|
mode: '0644'
|
2023-10-30 00:21:01 +01:00
|
|
|
loop: '{{ weechat__plugins }}'
|
2020-03-11 20:51:00 +01:00
|
|
|
|
2023-03-01 21:27:09 +01:00
|
|
|
- name: Symlinking plugins to autoload
|
2022-04-06 00:15:06 +02:00
|
|
|
ansible.builtin.file:
|
2023-03-01 21:27:09 +01:00
|
|
|
src: "{{ weechat__home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.', 1)[-1]] }}/{{ item }}"
|
|
|
|
dest: "{{ weechat__home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.', 1)[-1]] }}/autoload/{{ item }}"
|
2020-03-11 20:51:00 +01:00
|
|
|
state: link
|
2023-10-30 00:21:01 +01:00
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
loop: '{{ weechat__plugins }}'
|