mirror of
https://github.com/roles-ansible/ansible_role_weechat.git
synced 2024-08-16 13:09:48 +02:00
Adding save.directory option and dependabot
This commit is contained in:
parent
30c0110ed0
commit
a9d585a8fa
7 changed files with 47 additions and 13 deletions
9
.github/dependabot.yml
vendored
Normal file
9
.github/dependabot.yml
vendored
Normal file
|
@ -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"
|
14
.github/workflows/ansible-linting-check.yml
vendored
14
.github/workflows/ansible-linting-check.yml
vendored
|
@ -2,22 +2,22 @@
|
||||||
name: Ansible Lint check
|
name: Ansible Lint check
|
||||||
|
|
||||||
# yamllint disable-line rule:truthy
|
# yamllint disable-line rule:truthy
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
branches: '*'
|
|
||||||
pull_request:
|
|
||||||
branches: '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Ansible Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'checkout git repo'
|
- name: 'checkout git repo'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
submodules: false
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: 'Lint Ansible Playbook'
|
- name: 'Lint Ansible Playbook'
|
||||||
uses: ansible/ansible-lint-action@v6
|
uses: ansible/ansible-lint-action@v6
|
||||||
with:
|
with:
|
||||||
targets: "."
|
path: "."
|
||||||
|
|
2
.github/workflows/galaxy.yml
vendored
2
.github/workflows/galaxy.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 'release on galaxy'
|
- name: 'release on galaxy'
|
||||||
uses: robertdebock/galaxy-action@1.2.0
|
uses: robertdebock/galaxy-action@1.2.1
|
||||||
with:
|
with:
|
||||||
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
galaxy_api_key: ${{ secrets.galaxy_api_key }}
|
||||||
git_branch: 'main'
|
git_branch: 'main'
|
||||||
|
|
2
.github/workflows/yamllint.yaml
vendored
2
.github/workflows/yamllint.yaml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: 'Yamllint'
|
- name: 'Yamllint'
|
||||||
uses: karancode/yamllint-github-action@v2.0.0
|
uses: karancode/yamllint-github-action@v2.1.1
|
||||||
with:
|
with:
|
||||||
yamllint_file_or_dir: '.'
|
yamllint_file_or_dir: '.'
|
||||||
yamllint_config_filepath: './.yamllint'
|
yamllint_config_filepath: './.yamllint'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
role_name: weechat
|
role_name: weechat
|
||||||
author: do1jlr
|
author: l3d
|
||||||
description: Install and optional configure weechat via ansible
|
description: Install and optional configure weechat via ansible
|
||||||
license: "MIT"
|
license: "MIT"
|
||||||
min_ansible_version: '2.14'
|
min_ansible_version: '2.14'
|
||||||
|
|
|
@ -32,13 +32,38 @@
|
||||||
- weechat__custom_gen_ssh_key_pair | bool
|
- weechat__custom_gen_ssh_key_pair | bool
|
||||||
- ssh_key_pair.changed
|
- 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"
|
- name: "Change git repo owner to root"
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ weechat__home_directory }}/.weechat"
|
path: "{{ weechat__home_directory }}/.weechat"
|
||||||
recurse: true
|
recurse: true
|
||||||
owner: "root"
|
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
|
when: not weechat__custom_private_repo | bool
|
||||||
|
|
||||||
- name: Clone or update private git repository
|
- name: Clone or update private git repository
|
||||||
|
@ -73,5 +98,5 @@
|
||||||
path: "{{ weechat__home_directory }}/.weechat"
|
path: "{{ weechat__home_directory }}/.weechat"
|
||||||
recurse: true
|
recurse: true
|
||||||
owner: "{{ weechat__user }}"
|
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
|
when: not weechat__custom_private_repo | bool
|
||||||
|
|
|
@ -9,7 +9,7 @@ weechat_plugin_languages:
|
||||||
lua: 'lua'
|
lua: 'lua'
|
||||||
|
|
||||||
# version management
|
# 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'
|
playbook_version_path: 'role-weechat_roles-ansible_github.com.version'
|
||||||
|
|
||||||
weechat__debian_weechat_repo: "https://weechat.org/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main"
|
weechat__debian_weechat_repo: "https://weechat.org/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main"
|
||||||
|
|
Loading…
Reference in a new issue