diff --git a/defaults/main.yml b/defaults/main.yml index e6d69d8..2e7884a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,18 +1,15 @@ --- -# should we install weechat? -install_weechat: true - -# should we configure weechat -configure_weechat: true - -# user to install and use weechat -weechat_user: "{{ ansible_user_id }}" - -# where is our home direcotory for weechat -weechat_directory: "/home/{{ weechat_user }}/.weechat" - -# plugins we want -weechat_plugins: [] +weechat: + # should we install weechat? + install: true + # should we configure weechat + configure: true + # user to install and use weechat + user: "{{ ansible_user_id }}" + # where is our home direcotory for weechat + home_directory: "/home/{{ weechat_user }}/.weechat" + # plugins we want + plugins: [] # version check for this role? (true is recomended) submodules_versioncheck: false diff --git a/tasks/main.yml b/tasks/main.yml index 2d7371a..5eff529 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,9 +1,13 @@ --- +- name: combine weechat variables + set_fact: + weechat: "{{ _weechat | combine(weechat, recursive=True) }}" + - include_tasks: versioncheck.yml when: submodules_versioncheck|bool - include_tasks: "install-{{ ansible_os_family|lower }}.yml" - when: install_weechat | bool + when: weechat.install | bool #- include_tasks: plugins.yml # when: configure_weechat | bool diff --git a/vars/main.yml b/vars/main.yml index 62c4ba1..c7970e3 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -9,5 +9,15 @@ weechat_plugin_languages: lua: lua # version management -playbook_version_number: 2048 # should be over ninethousand +playbook_version_number: 2049 # should be over ninethousand playbook_version_path: 'role-weechat_roles-ansible_github.com.version' + +# default values +_weechat: + install: true + configure: true + user: "{{ ansible_user_id }}" + home_directory: "/home/{{ weechat_user }}/.weechat" + plugins: [] + +