-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support RedHad-based systems and latest Ansible versions
- Loading branch information
1 parent
ee4fc3e
commit 666a634
Showing
35 changed files
with
785 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
--- | ||
exclude_paths: | ||
- .travis.yml | ||
- .travis.yml | ||
- .ansible-lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,45 @@ | ||
# -*- mode: yaml -*- | ||
# vim:ts=2:sw=2:ai:si:syntax=yaml | ||
################################ | ||
# pre-commit hooks configuration | ||
################################ | ||
--- | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks.git | ||
rev: v2.2.3 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
args: ['--markdown-linebreak-ext=md'] | ||
args: ["--markdown-linebreak-ext=md"] | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
args: ['--fix=lf'] | ||
args: ["--fix=lf"] | ||
- id: check-yaml | ||
- id: pretty-format-json | ||
args: ['--autofix', '--indent=2', '--no-sort-keys'] | ||
args: ["--autofix", "--indent=2", "--no-sort-keys"] | ||
|
||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.16.0 | ||
rev: v1.29.0 | ||
hooks: | ||
- id: yamllint | ||
|
||
- repo: https://github.com/ansible/ansible-lint.git | ||
rev: v4.1.0 | ||
rev: v6.13.1 | ||
hooks: | ||
- id: ansible-lint | ||
files: \.(yaml|yml)$ | ||
|
||
- repo: https://github.com/bemeurer/beautysh.git | ||
rev: '4.1' | ||
- repo: https://github.com/syntaqx/git-hooks | ||
rev: v0.0.17 | ||
hooks: | ||
- id: beautysh | ||
- id: shellcheck | ||
files: (tests/run-.*|tests/update)$ | ||
|
||
- repo: https://github.com/openstack-dev/bashate.git | ||
rev: '0.6.0' | ||
- repo: https://github.com/scop/pre-commit-shfmt | ||
rev: v3.6.0-1 | ||
hooks: | ||
- id: bashate | ||
- id: shfmt | ||
files: (tests/run-.*|tests/update)$ | ||
|
||
- repo: https://github.com/igorshubovych/markdownlint-cli.git | ||
rev: v0.17.0 | ||
rev: v0.33.0 | ||
hooks: | ||
- id: markdownlint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,33 @@ | ||
PRE_COMMIT_HOOKS=.git/hooks/pre-commit | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
# Use VERBOSE=1 make <command> to get verbose output | ||
ifndef VERBOSE | ||
.SILENT: | ||
endif | ||
|
||
.PHONY: help | ||
help: ## print this help | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort -d | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
PRE_COMMIT_HOOKS = .git/hooks/pre-commit | ||
|
||
TEST_IMAGES = $(shell ls tests/*/Dockerfile | xargs dirname | xargs basename) | ||
|
||
.PHONY: setup | ||
setup: $(PRE_COMMIT_HOOKS) | ||
|
||
.PHONY: test | ||
test: | ||
@./tests/run-tests | ||
test: ## run tests with all available Docker images | ||
./tests/run-tests | ||
|
||
.PHONY: $(TEST_IMAGES) | ||
$(TEST_IMAGES): | ||
./tests/run-tests $@ | ||
|
||
.PHONY: lint | ||
lint: $(PRE_COMMIT_HOOKS) | ||
@pre-commit run -a | ||
pre-commit run -a | ||
|
||
$(PRE_COMMIT_HOOKS): | ||
@pre-commit install | ||
pre-commit install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
--- | ||
|
||
# Path to user home directory | ||
linuxbrew_home: "{{ ansible_env.HOME }}" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
--- | ||
|
||
- name: Install dependencies with APT | ||
apt: | ||
ansible.builtin.apt: | ||
name: "{{ linuxbrew_install_dependencies }}" | ||
when: linuxbrew_install_dependencies is defined | ||
become: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: Install dependencies on Debian based systems | ||
ansible.builtin.include_tasks: debian.yml | ||
when: "ansible_os_family == 'Debian' or ansible_distribution == 'Pengwin'" | ||
|
||
- name: Install dependencies on RedHat based systems | ||
ansible.builtin.include_tasks: redhat.yml | ||
when: "ansible_os_family == 'RedHat'" | ||
|
||
- name: Install with Git | ||
ansible.builtin.include_tasks: with_git.yml | ||
when: not linuxbrew_use_installer | ||
|
||
- name: Install using the installer script | ||
ansible.builtin.include_tasks: with_installer.yml | ||
when: linuxbrew_use_installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Install dependencies with yum | ||
ansible.builtin.yum: | ||
name: "{{ linuxbrew_install_dependencies }}" | ||
state: present | ||
when: linuxbrew_install_dependencies is defined | ||
become: true |
Oops, something went wrong.