mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2024-09-28 19:41:26 +02:00
ce4f28650b
ansible-lint no longer depends on ansible[1][2] which causes it to fail
with: syntax-check: couldn't resolve module/action 'pacman', as the
modules is part of ansible and not ansible-base.
[1] https://bugs.archlinux.org/task/69920
[2] a3ccb42b8d
27 lines
917 B
YAML
27 lines
917 B
YAML
image: "archlinux:latest"
|
|
|
|
before_script:
|
|
- pacman -Syu --needed --noconfirm ansible-lint ansible yamllint terraform
|
|
|
|
ansible-lint:
|
|
script:
|
|
# Fix weird ansible bug: https://github.com/trailofbits/algo/issues/1637
|
|
# This probably happens due to gitlab-runner mounting the git repo into the container
|
|
- chmod o-w .
|
|
# Fix syntax-check rule (https://github.com/ansible-community/ansible-lint/issues/1350#issuecomment-778764110)
|
|
- sed "s/,hcloud_inventory.py//" -i ansible.cfg
|
|
- sed "/^vault_password_file/d" -i ansible.cfg
|
|
# Fix load-failure: Failed to load or parse file
|
|
- ansible-lint $(printf -- "--exclude %s " */*/vault_*)
|
|
|
|
terraform-validate:
|
|
script:
|
|
- cd tf-stage1
|
|
- terraform init -backend=false
|
|
- terraform validate
|
|
- terraform fmt --check
|
|
- cd ../tf-stage2
|
|
- terraform init -backend=false
|
|
- terraform validate
|
|
- terraform fmt --check --diff
|