Commit f73e9d31 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

Merge branch 'make-anible-lint-pass' into 'master'

Pass ansible-lint and add CI pipeline

See merge request areas/software-networks/operator-platform/op-automation!3
parents d3ce43a6 11eaaab4
Loading
Loading
Loading
Loading

.ansible-lint

0 → 100644
+7 −0
Original line number Diff line number Diff line
profile: min
skip_list:
  - var-naming
  - yaml[line-length]
  - run-once[task]
  - no-handler

.ansible/.lock

deleted100644 → 0
+0 −0

Empty file deleted.

+2 −0
Original line number Diff line number Diff line
@@ -17,3 +17,5 @@ automation/1-kind-cluster/setup-env.sh
/tmp/
*.tmp
*.log

.gitlab-ci-local/
+20 −0
Original line number Diff line number Diff line
image: python:3.9-alpine

stages:
  - lint
  - deploy

ansible-lint:
  stage: lint
  image: python:3.9
  script:
    - pip install ansible-lint
    - cd ansible
    - chmod 700 .
    - 'echo "profile: min" > .ansible-lint'
    - 'echo "skip_list:" >> .ansible-lint'
    - 'echo "  - var-naming" >> .ansible-lint'
    - 'echo "  - yaml[line-length]" >> .ansible-lint'
    - 'echo "  - run-once[task]" >> .ansible-lint'
    - 'echo "  - no-handler" >> .ansible-lint'
    - ansible-galaxy collection install -r requirements.yml --ignore-certs
    - ansible-lint playbooks/ roles/

pages:
  stage: deploy
  script:

ansible.cfg

0 → 100644
+19 −0
Original line number Diff line number Diff line
[defaults]
inventory = ansible/inventory/hosts.yml
roles_path = ansible/roles
collections_paths = ~/.ansible/collections:/usr/share/ansible/collections
host_key_checking = False
interpreter_python = auto_silent
retry_files_enabled = False
gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp/ansible_facts
fact_caching_timeout = 86400

[inventory]
enable_plugins = yaml, ini

[privilege_escalation]
become = False
become_method = sudo
become_user = root
Loading