-
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.
Merge pull request #7 from fidanf/ansible-lint-v5
Ansible lint v5 + CI refactoring
- Loading branch information
Showing
9 changed files
with
120 additions
and
121 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,17 +1,17 @@ | ||
--- | ||
# https://docs.ansible.com/ansible-lint/rules/default_rules.html | ||
exclude_paths: | ||
- ../.ansible/roles/ | ||
- .cache/ | ||
- .github/ | ||
verbosity: 1 | ||
use_default_rules: true | ||
skip_list: | ||
- '106' # Role names are now limited to contain only lowercase alphanumeric characters, plus ‘_’ and start with an alpha character | ||
- '204' # Lines should be no longer than 160 chars | ||
- '201' # Trailing whitespace | ||
- '301' # Commands should not change things if nothing needs doing | ||
- '303' # Using command rather than module | ||
- '305' # Use shell only when shell functionality is required | ||
- '501' # become_user requires become to work as expected | ||
- '701' # meta/main.yml should contain relevant info | ||
- '503' # Tasks that run when changed should likely be handlers | ||
- '602' # Don't compare to empty string | ||
verbosity: 1 | ||
exclude_paths: | ||
- ../.ansible/roles | ||
- tasks/main.yml | ||
- command-instead-of-shell | ||
- no-changed-when | ||
- no-handler | ||
- empty-string-compare | ||
- ignore-errors | ||
- var-naming | ||
warn_list: | ||
- no-log-password |
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,42 +1,35 @@ | ||
--- | ||
os: linux | ||
dist: bionic | ||
language: shell | ||
dist: focal | ||
language: python | ||
python: | ||
- 3.8 | ||
|
||
env: | ||
global: | ||
- VAGRANT_DEFAULT_PROVIDER=libvirt | ||
- ROLE_PATH=$TRAVIS_BUILD_DIR | ||
- PY_COLORS=1 | ||
- VAGRANT_DEFAULT_PROVIDER: libvirt | ||
- PY_COLORS: 1 | ||
jobs: | ||
- MOLECULE_DISTRO: generic/ubuntu1804 | ||
- MOLECULE_DISTRO: generic/debian10 | ||
|
||
services: | ||
- docker | ||
|
||
cache: | ||
directories: | ||
- /home/travis/.vagrant.d/boxes | ||
- /home/travis/.cache/pipenv | ||
- /home/travis/.cache/pip | ||
|
||
before_install: | ||
- | | ||
curl -Os https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.deb | ||
curl -Os https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_SHA256SUMS | ||
curl -Os https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_SHA256SUMS.sig | ||
gpg --receive-key 51852D87348FFC4C | ||
gpg --verify vagrant_2.2.14_SHA256SUMS.sig vagrant_2.2.14_SHA256SUMS | ||
sha256sum -c vagrant_2.2.14_SHA256SUMS 2>&1 | grep OK | ||
sudo apt-get update && sudo apt-get install -y bridge-utils dnsmasq-base ebtables libvirt-bin libvirt-dev qemu-kvm qemu-utils ruby-dev | ||
sudo dpkg -i vagrant_2.2.14_x86_64.deb | ||
sudo vagrant plugin install vagrant-libvirt | ||
rm -rf vagrant_2.2.14_* | ||
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - | ||
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | ||
sudo apt-get update && sudo apt-get install vagrant | ||
sudo apt-get install -y build-essential qemu-kvm qemu-utils libvirt-dev libvirt-daemon-system libvirt-clients bridge-utils virtinst virt-manager dnsmasq | ||
CONFIGURE_ARGS="with-libvirt-include=/usr/share/libvirt with-libvirt-lib=/usr/lib64" sudo vagrant plugin install vagrant-libvirt | ||
- | | ||
sudo -H pip install --upgrade pip | ||
sudo -H pip install --upgrade --ignore-installed --requirement requirements.txt | ||
- | | ||
sudo apt-get -y purge python3-openssl && sudo apt-get -y autoremove | ||
sudo apt-get update && sudo apt-get install -y ca-certificates curl gcc iproute2 pwgen python3 python3-dev sudo | ||
curl -skL https://bootstrap.pypa.io/get-pip.py | sudo -H python3 | ||
sudo -H pip3 install --upgrade --ignore-installed --requirement requirements.txt | ||
molecule --version | ||
script: | ||
- sudo -E molecule test |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
collections: | ||
- community.crypto |
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
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,4 +1,5 @@ | ||
--- | ||
- src: https://github.com/fidanf/ansible-role-postgresql-ha | ||
name: fidanf.postgresql-ha | ||
version: master | ||
roles: | ||
- src: https://github.com/fidanf/ansible-role-postgresql-ha | ||
name: fidanf.postgresql_ha | ||
version: 2.4.2 |
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,14 +1,14 @@ | ||
ansible>=2.10.7,<2.11.0 | ||
molecule==3.2.0 | ||
molecule | ||
molecule-vagrant==0.6.1 | ||
ansible-lint==4.3.7 | ||
yamllint==1.26.0 | ||
pyyaml<6,>=5.1 | ||
ansible-lint | ||
yamllint | ||
python-vagrant | ||
docker | ||
docker-compose | ||
netaddr | ||
dnspython | ||
cryptography | ||
jsondiff | ||
pyyaml | ||
pyOpenSSL |