diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..dde6f4a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +--- +# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/galaxy.svg b/.github/galaxy.svg deleted file mode 100644 index 3246c86..0000000 --- a/.github/galaxy.svg +++ /dev/null @@ -1,483 +0,0 @@ - - - - - - image/svg+xml - - - - - - 3D <l3d@c3woc.de> - - - - - MIT License - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.github/license.svg b/.github/license.svg deleted file mode 100644 index 4ab6d9a..0000000 --- a/.github/license.svg +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - image/svg+xml - - - - - - 3D <l3d@c3woc.de> - - - - - MIT License - - - - - - - - - - - - - - - - - - - - - - - - - - - MIT - MIT - - - license - license - - diff --git a/.github/workflows/ansible-debian-bullseye.yml b/.github/workflows/ansible-debian-bullseye.yml deleted file mode 100644 index b50d111..0000000 --- a/.github/workflows/ansible-debian-bullseye.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check debian:bullseye - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: 'checkout git repo' - uses: actions/checkout@v3 - - - name: 'ansible check with debian:bullseye' - uses: roles-ansible/check-ansible-debian-bullseye-action@main - with: - targets: "./" diff --git a/.github/workflows/ansible-debian-buster.yml b/.github/workflows/ansible-debian-buster.yml deleted file mode 100644 index a819e89..0000000 --- a/.github/workflows/ansible-debian-buster.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check debian:buster - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: 'checkout git repo' - uses: actions/checkout@v3 - - - name: 'ansible check with debian:buster' - uses: roles-ansible/check-ansible-debian-buster-action@master - with: - targets: "./" diff --git a/.github/workflows/ansible-debian-latest.yml b/.github/workflows/ansible-debian-latest.yml deleted file mode 100644 index d06a132..0000000 --- a/.github/workflows/ansible-debian-latest.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check debian:latest - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: 'checkout git repo' - uses: actions/checkout@v3 - - - name: 'ansible check with debian:latest' - uses: roles-ansible/check-ansible-debian-latest-action@master - with: - targets: "./" diff --git a/.github/workflows/ansible-debian-stable.yml b/.github/workflows/ansible-debian-stable.yml deleted file mode 100644 index bf06f77..0000000 --- a/.github/workflows/ansible-debian-stable.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Ansible check debian:stable - -# yamllint disable-line rule:truthy -on: - push: - branches: '*' - pull_request: - branches: '*' - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: 'checkout git repo' - uses: actions/checkout@v3 - - - name: 'ansible check with debian:stable' - uses: roles-ansible/check-ansible-debian-stable-action@master - with: - targets: "./" diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index 150e908..5c55ca6 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -2,22 +2,22 @@ name: Ansible Lint check # yamllint disable-line rule:truthy -on: - push: - branches: '*' - pull_request: - branches: '*' +on: [push, pull_request] jobs: build: - + name: Ansible Lint runs-on: ubuntu-latest steps: - name: 'checkout git repo' uses: actions/checkout@v3 + with: + lfs: true + submodules: false + fetch-depth: 0 - name: 'Lint Ansible Playbook' uses: ansible/ansible-lint-action@v6 with: - targets: "." + path: "." diff --git a/.github/workflows/ansible-ubuntu-latest.yml b/.github/workflows/ansible-ubuntu-latest.yml deleted file mode 100644 index 583b6ad..0000000 --- a/.github/workflows/ansible-ubuntu-latest.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Ansible check ubuntu:latest - -# yamllint disable-line rule:truthy -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: 'checkout git repo' - uses: actions/checkout@v3 - - - name: ansible check with ubuntu:latest - uses: roles-ansible/check-ansible-ubuntu-latest-action@master - with: - targets: "./" diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index adcecbd..39fa2be 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v3 - name: 'release on galaxy' - uses: robertdebock/galaxy-action@1.2.0 + uses: robertdebock/galaxy-action@1.2.1 with: galaxy_api_key: ${{ secrets.galaxy_api_key }} git_branch: 'main' diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index d744e9c..361b111 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v3 - name: 'Yamllint' - uses: karancode/yamllint-github-action@v2.0.0 + uses: karancode/yamllint-github-action@v2.1.1 with: yamllint_file_or_dir: '.' yamllint_config_filepath: './.yamllint' diff --git a/README.md b/README.md index 7c15121..b24854b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -[![Ansible Galaxy](https://raw.githubusercontent.com/roles-ansible/ansible_role_weechat/main/.github/galaxy.svg)](https://galaxy.ansible.com/do1jlr/weechat) -[![MIT License](https://raw.githubusercontent.com/roles-ansible/ansible_role_weechat/main/.github/license.svg?sanitize=true)](https://github.com/roles-ansible/ansible_role_weechat/blob/main/LICENSE) +[![Ansible Galaxy](https://ansible.l3d.space/svg/l3d.weechat.svg)](https://galaxy.ansible.com/l3d/weechat) +[![BSD-3 Clause](https://ansible.l3d.space/svg/l3d.weechat_license.svg)](LICENSE) +[![Maintainance](https://ansible.l3d.space/svg/l3d.weechat_maintainance.svg)](https://ansible.l3d.space/#l3d.weechat) ansible weechat role ========================== @@ -11,7 +12,7 @@ Ansible role to install and configure weechat. What can this role: ----------------- - install weechat on Debian, Ubuntu, Archlinux or Fedora - - configure weechat + - add configuration from private git repo - autostart via tmux and systemd Settings @@ -100,11 +101,8 @@ If you missing a feature, found a bug or have questions about this role please f LICENSE ---------- -[MIT License](https://github.com/chaos-bodensee/role_weechat/blob/master/LICENSE)
-+ ``Copyright (c) 2019 L3D`` -+ The complete list of awesome contributros can be found [here](https://github.com/chaos-bodensee/role_weechat/graphs/contributors). - - -### testing -This role is tested with some of [these github-action](https://github.com/search?q=topic%3Acheck-ansible+topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories) tests for different versions of differen linux systems. Linting is tested via the [ansible-lint action](https://github.com/marketplace/actions/ansible-lint). -If you want to find out more about our tests, please have a look at the github marketplace. +[![MIT License](https://ansible.l3d.space/svg/l3d.weechat_license.svg)](LICENSE) +``` +Copyright (c) 2019 L3D +``` +*The complete list of awesome contributros can be found [here](https://github.com/chaos-bodensee/role_weechat/graphs/contributors).* diff --git a/meta/main.yml b/meta/main.yml index 84d343a..ad959ce 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,7 +1,7 @@ --- galaxy_info: role_name: weechat - author: do1jlr + author: l3d description: Install and optional configure weechat via ansible license: "MIT" min_ansible_version: '2.14' diff --git a/tasks/configure_custom_config.yml b/tasks/configure_custom_config.yml index 43d93c7..52c9e84 100644 --- a/tasks/configure_custom_config.yml +++ b/tasks/configure_custom_config.yml @@ -32,13 +32,38 @@ - weechat__custom_gen_ssh_key_pair | bool - ssh_key_pair.changed +- name: Add git repo to save.directory globally for root + become: true + community.general.git_config: + name: safe.directory + scope: global + value: "{{ weechat__home_directory }}/.weechat" + register: save_directory + +- name: "Add git repo to save.directory globally for {{ weechat__user }}" + become: true + community.general.git_config: + file: "{{ weechat__home_directory }}/.gitconfig" + name: safe.directory + scope: file + value: "{{ weechat__home_directory }}/.weechat" + register: save_user_directory + +- name: "Change git repo owner to {{ weechat__user }}" + become: true + ansible.builtin.file: + path: "{{ weechat__home_directory }}/.gitconfig" + recurse: false + owner: "{{ weechat__user }}" + changed_when: save_user_directory.changed | bool + - name: "Change git repo owner to root" become: true ansible.builtin.file: path: "{{ weechat__home_directory }}/.weechat" recurse: true owner: "root" - changed_when: ssh_key_pair.changed + changed_when: ssh_key_pair.changed | bool or save_directory.changed | bool when: not weechat__custom_private_repo | bool - name: Clone or update private git repository @@ -73,5 +98,5 @@ path: "{{ weechat__home_directory }}/.weechat" recurse: true owner: "{{ weechat__user }}" - changed_when: ssh_key_pair.changed + changed_when: ssh_key_pair.changed | bool or save_directory.changed | bool when: not weechat__custom_private_repo | bool diff --git a/vars/main.yml b/vars/main.yml index 63ae78b..2286d66 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -9,7 +9,7 @@ weechat_plugin_languages: lua: 'lua' # version management -playbook_version_number: 4222 # should be over ninethousand +playbook_version_number: 4223 # should be over ninethousand playbook_version_path: 'role-weechat_roles-ansible_github.com.version' weechat__debian_weechat_repo: "https://weechat.org/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main"