diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100755 index 0000000..150fa99 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,42 @@ +--- +name: Lint +'on': + pull_request: + push: + branches: + - master + +jobs: + + test: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Check out the codebase. + uses: actions/checkout@v2 + + - name: Set up Python 3.7. + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install test dependencies. + run: pip3 install yamllint ansible-lint + + - name: Run yamllint. + run: yamllint . + + - name: Run ansible-lint. + run: ansible-lint + + - name: 'Slack Notification' + uses: clouddrove/action-slack@v2 + with: + status: ${{ job.status }} + fields: repo,author + author_name: 'Clouddrove' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + if: always() diff --git a/.yamllint b/.yamllint new file mode 100755 index 0000000..8f19687 --- /dev/null +++ b/.yamllint @@ -0,0 +1,9 @@ +--- +extends: default + +rules: + line-length: + max: 120 + level: warning + truthy: + allowed-values: ['true', 'false', 'yes', 'no'] diff --git a/tasks/install.yml b/tasks/install.yml index ef4f024..cf24225 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -22,6 +22,7 @@ service: name: nginx state: restarted + enabled: true changed_when: false - name: wait for nginx to become ready