diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61a6a9143..86766dcf4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,23 +6,23 @@ on: pull_request: jobs: - #ansible-lint: - # runs-on: ubuntu-20.04 + ansible-lint: + runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - # - uses: actions/setup-python@v4 - # with: - # python-version: '3.10.15' + - uses: actions/setup-python@v4 + with: + python-version: '3.10.15' - # - name: Set up Ansible - # run: | - # pip install -r requirements.txt - # bin/setup + - name: Set up Ansible + run: | + pip install -r requirements.txt + bin/setup - # - name: Ansible Lint - # run: ansible-lint playbooks/*.yml --exclude community + - name: Ansible Lint + run: bin/lint playbook-tests: runs-on: ubuntu-20.04 diff --git a/bin/lint b/bin/lint index f3eae5004..5db50c2de 100755 --- a/bin/lint +++ b/bin/lint @@ -1,3 +1,3 @@ #!/bin/sh -exec ansible-lint site.yml playbooks/*.yml --exclude community +exec ansible-lint site.yml playbooks/*.yml --exclude community --profile=min --offline diff --git a/playbooks/provision.yml b/playbooks/provision.yml index f049ff29a..733d2cb56 100644 --- a/playbooks/provision.yml +++ b/playbooks/provision.yml @@ -111,7 +111,7 @@ tags: newrelic tasks: - - name: Fix Ruby # noqa 301 + - name: Fix Ruby # no-changed-when command: cmd: bash -lc "rbenv uninstall -f {{ ruby_version }} && rbenv install {{ ruby_version }} && touch ~/.rbenv/versions/{{ ruby_version }}/.reinstalled" creates: "~/.rbenv/versions/{{ ruby_version }}/.reinstalled" diff --git a/playbooks/restore_backup.yml b/playbooks/restore_backup.yml index aa1afebc3..c6c464ff8 100644 --- a/playbooks/restore_backup.yml +++ b/playbooks/restore_backup.yml @@ -4,7 +4,7 @@ remote_user: "{{ app_user }}" tasks: - - name: restore backup # noqa 301 + - name: restore backup # no-changed-when command: "{{ bundle_path }} exec rake db2fog:restore" args: chdir: "{{ current_path }}" diff --git a/requirements.txt b/requirements.txt index 63c22e803..0bd00ea92 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,9 +2,6 @@ # https://github.com/ansible-community/ansible-build-data ansible==8.5.0 -# This version doesn't work with the current Ansible version. -# But upgrading seems to break the build. -# TODO: upgrade ans fix ansible-lint -#ansible-lint==4.2.0 -yamllint==1.21.0 +ansible-lint==6.22.2 +yamllint jinja2<3.1