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

33 lines
1.1 KiB
YAML
Raw Normal View History

2020-03-11 20:51:00 +01:00
---
- name: create weechat directory
become: true
become_user: "{{ weechat.user }}"
file:
2020-03-12 23:03:29 +01:00
path: "{{ weechat.home_directory }}/.weechat"
state: directory
owner: "{{ weechat.user }}"
mode: "0750"
- name: create weechat plugins directory
become: true
become_user: "{{ weechat.user }}"
file:
2020-03-12 23:03:29 +01:00
path: "{{ weechat.home_directory }}/.weechat/{{ 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 }}'
2020-03-12 23:03:29 +01:00
dest: "{{ weechat.home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}"
2020-03-11 20:51:00 +01:00
with_items: '{{ weechat.plugins }}'
- name: symlinking plugins to autoload
file:
2020-03-12 23:03:29 +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
with_items: '{{ weechat.plugins }}'