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

34 lines
1.1 KiB
YAML
Raw Normal View History

2020-03-11 20:51:00 +01:00
---
2023-03-01 21:27:09 +01:00
- name: Create weechat directory
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"
state: directory
2021-05-27 16:18:04 +02:00
owner: "{{ weechat__user }}"
mode: "0750"
2023-03-01 21:27:09 +01:00
- name: Create weechat plugins directory
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"
state: directory
2021-05-27 16:18:04 +02:00
owner: "{{ weechat__user }}"
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 }}'