mirror of
https://github.com/roles-ansible/ansible_role_weechat.git
synced 2024-08-16 13:09:48 +02:00
30 lines
1 KiB
YAML
30 lines
1 KiB
YAML
---
|
|
- name: create weechat directory
|
|
become: true
|
|
file:
|
|
path: "{{ weechat__home_directory }}/.weechat"
|
|
state: directory
|
|
owner: "{{ weechat__user }}"
|
|
mode: "0750"
|
|
|
|
- name: create weechat plugins directory
|
|
become: true
|
|
file:
|
|
path: "{{ weechat__home_directory }}/.weechat/{{ item.value }}/autoload"
|
|
state: directory
|
|
owner: "{{ weechat__user }}"
|
|
mode: "0750"
|
|
with_dict: "{{ weechat_plugin_languages }}"
|
|
|
|
- name: download weechat plugins
|
|
get_url:
|
|
url: 'https://weechat.org/files/scripts/{{ item }}'
|
|
dest: "{{ weechat__home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
|
|
with_items: '{{ weechat__plugins }}'
|
|
|
|
- name: symlinking plugins to autoload
|
|
file:
|
|
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 }}"
|
|
state: link
|
|
with_items: '{{ weechat__plugins }}'
|