diff --git a/README.md b/README.md index a90aee0..d594e01 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # role_weechat Ansible role to install and configure weechat + +```txt +WARNING + +It is work-in-progress. Be careful! +``` diff --git a/defaults/main.yml b/defaults/main.yml index e17b576..5771244 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,5 +2,13 @@ # should we install weechat? install_weechat: true +# should we configure weechat +configure_weechat: true + +weechat_user: + +# where is our home direcotory for weechat +weechat_directory: "/home/{{ weechat_user }}/.weechat" + # version check for this role? submodules_versioncheck: true diff --git a/tasks/directorys.yml b/tasks/directorys.yml new file mode 100644 index 0000000..6b61efa --- /dev/null +++ b/tasks/directorys.yml @@ -0,0 +1,17 @@ +--- +- name: 'create {{ weechat_directory }}' + become: true + become_user: "{{ weechat_user }}" + file: + path: "{{ weechat_directory }}" + state: directory + owner: "{{ weechat_user }}" + group: "{{ weechat_user }}" + +- name: create plugin directories + file: + path: "{{ weechat_directory }}/{{ item.value }}/autoload" + state: directory' + owner: "{{ weechat_user }}" + group: "{{ weechat_user }}" + with_dict: '{{ weechat_plugin_languages }}' diff --git a/tasks/main.yml b/tasks/main.yml index 0bf02d2..ce0de03 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,3 +4,6 @@ - include_tasks: "install-{{ ansible_os_version|lower }}.yml" when: install_weechat | bool + +- include_tasks: directorys.yml + when: configure_weechat | bool diff --git a/vars/main.yml b/vars/main.yml index c62efe1..1a40126 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,3 +1,13 @@ --- -playbook_version_number: 1025 # should be over ninethousand +# weechat plugin languages +weechat_plugin_languages: + pl: perl + scm: guile + js: javascript + py: python + rb: ruby + lua: lua + +# version management +playbook_version_number: 1026 # should be over ninethousand playbook_version_path: '/etc/ansible-version/role-weechat_chaos-bodensee_github.com.version'