2020-03-11 20:51:00 +01:00
|
|
|
---
|
2020-03-11 21:08:00 +01:00
|
|
|
- name: create weechat directory
|
|
|
|
become: true
|
|
|
|
become_user: "{{ weechat.user }}"
|
|
|
|
file:
|
|
|
|
path: "{{ weechat.home_directory }}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ weechat.user }}"
|
|
|
|
mode: "0750"
|
|
|
|
|
|
|
|
- name: create weechat plugins directory
|
|
|
|
become: true
|
|
|
|
become_user: "{{ weechat.user }}"
|
|
|
|
file:
|
|
|
|
path: "{{ weechat.home_directory }}/{{ item.value }}/autoload"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ weechat.user }}"
|
|
|
|
mode: "0750"
|
|
|
|
with_dict: "{{ weechat_plugin_languages }}"
|
|
|
|
|
2020-03-11 20:51:00 +01:00
|
|
|
- name: download weechat plugins
|
|
|
|
get_url:
|
|
|
|
url: 'https://weechat.org/files/scripts/{{ item }}'
|
|
|
|
dest: "{{ weechat.home_directory }}/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
|
|
|
|
with_items: '{{ weechat.plugins }}'
|
|
|
|
|
|
|
|
- name: symlinking plugins to autoload
|
|
|
|
file:
|
|
|
|
src: "{{ weechat.home_directory }}/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
|
|
|
|
dest: "{{ weechat.home_directory }}/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/autoload/{{ item }}"
|
|
|
|
state: link
|
|
|
|
with_items: '{{ weechat.plugins }}'
|