From 21ae74cb6fcfd54f82fe78394a830e709b361250 Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 6 Apr 2022 00:15:06 +0200 Subject: [PATCH] update linting and use FQCN --- .github/workflows/ansible-linting-check.yml | 8 +------- .github/workflows/galaxy.yml | 2 +- .github/workflows/yamllint.yaml | 2 -- defaults/main.yml | 16 ++++++++-------- tasks/configure_custom_config.yml | 2 +- tasks/configure_plugins.yml | 9 +++++---- 6 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index 7973217..0b743f7 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -7,8 +7,6 @@ on: branches: '*' pull_request: branches: '*' - schedule: - - cron: '42 6 * */1 *' jobs: build: @@ -19,10 +17,6 @@ jobs: - uses: actions/checkout@v2 - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@master + uses: ansible/ansible-lint-action@v6 with: targets: "." - # [required] - # Paths to ansible files (i.e., playbooks, tasks, handlers etc..) - args: "" - # [optional] diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index b5dc0ec..329cd2e 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -15,6 +15,6 @@ jobs: - name: checkout uses: actions/checkout@v2 - name: galaxy - uses: robertdebock/galaxy-action@1.1.0 + uses: robertdebock/galaxy-action@1.2.0 with: galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index ddb5b89..d4ad029 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -7,8 +7,6 @@ on: branches: '*' pull_request: branches: '*' - schedule: - - cron: '23 6 * */1 *' jobs: yamllint: diff --git a/defaults/main.yml b/defaults/main.yml index f602381..0491c4e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,19 +1,19 @@ --- - # should we install weechat? +# should we install weechat? weechat__install: true - # autostart weechat via systemd in a tmux session? +# autostart weechat via systemd in a tmux session? weechat__autostart: false - # should we install official weechat plugins +# should we install official weechat plugins weechat__install_plugins: false - # custom weechat config (requires some manual interaction for long-term usage) +# custom weechat config (requires some manual interaction for long-term usage) weechat__use_custom_config: false - # user to install and use weechat +# user to install and use weechat weechat__user: "{{ ansible_user_id }}" - # where is our home direcotory for weechat +# where is our home direcotory for weechat weechat__home_directory: "{{ ansible_env.HOME | default('/home/{{ weechat__user }}') }}" - # plugins we want +# plugins we want weechat__plugins: [] - # weechat gpg key for debian/ubuntu repo +# weechat gpg key for debian/ubuntu repo weechat__gpg_id: '11E9DE8848F2B65222AA75B8D1820DB22A11534E' # path to your custom weechat config (with plugins) git repo diff --git a/tasks/configure_custom_config.yml b/tasks/configure_custom_config.yml index ba3f5ed..5d8f61b 100644 --- a/tasks/configure_custom_config.yml +++ b/tasks/configure_custom_config.yml @@ -45,7 +45,7 @@ ssh_opts: "-i {{ weechat__home_directory }}/.ssh/id_ed25519" rescue: - name: wait until you fixed remote git issues - pause: + ansible.builtin.pause: prompt: "Please fix the issue with your git repository and try again" - name: try to download/update git repo again diff --git a/tasks/configure_plugins.yml b/tasks/configure_plugins.yml index d93b7f5..4d086f8 100644 --- a/tasks/configure_plugins.yml +++ b/tasks/configure_plugins.yml @@ -1,7 +1,7 @@ --- - name: create weechat directory become: true - file: + ansible.builtin.file: path: "{{ weechat__home_directory }}/.weechat" state: directory owner: "{{ weechat__user }}" @@ -9,7 +9,7 @@ - name: create weechat plugins directory become: true - file: + ansible.builtin.file: path: "{{ weechat__home_directory }}/.weechat/{{ item.value }}/autoload" state: directory owner: "{{ weechat__user }}" @@ -17,13 +17,14 @@ with_dict: "{{ weechat_plugin_languages }}" - name: download weechat plugins - get_url: + ansible.builtin.get_url: url: 'https://weechat.org/files/scripts/{{ item }}' dest: "{{ weechat__home_directory }}/.weechat/{{ weechat_plugin_languages[item.split('.',1)[-1]] }}/{{ item }}" + mode: '0644' with_items: '{{ weechat__plugins }}' - name: symlinking plugins to autoload - file: + ansible.builtin.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