Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #17 from geerlingguy/16-lints
Browse files Browse the repository at this point in the history
Fixes #16: Add ansible-lint and yamllint.
  • Loading branch information
geerlingguy committed May 28, 2020
2 parents 7119e93 + 10c7b0c commit 2afff86
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 50 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms
---
github: geerlingguy
patreon: geerlingguy
56 changes: 56 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 90

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 30

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- planned

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

pulls:
markComment: |-
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark pull requests as stale.
unmarkComment: >-
This pull request is no longer marked for closure.
closeComment: >-
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.
issues:
markComment: |-
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read [this blog post](https://www.jeffgeerling.com/blog/2020/enabling-stale-issue-bot-on-my-github-repositories) to see the reasons why I mark issues as stale.
unmarkComment: >-
This issue is no longer marked for closure.
closeComment: >-
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: CI
'on':
pull_request:
push:
branches:
- master

jobs:

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Check out the codebase.
uses: actions/checkout@v2

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install yamllint

- name: Lint all the YAMLs.
run: yamllint .
11 changes: 11 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
extends: default
rules:
line-length:
max: 120
level: warning
truthy: false

ignore: |
**/.github/workflows/ci.yml
**/stale.yml
2 changes: 1 addition & 1 deletion roles/drupal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- name: Apply drupal manifests.
k8s:
definition: "{{ lookup('template', 'files/' + item ) }}"
definition: "{{ lookup('template', 'templates/' + item ) }}"
state: present
loop:
- mariadb.yml
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion roles/status/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
- "Wordpress: http://wordpress.{{ ingress_server_ip }}.nip.io/"
- "Minecraft: (`kubectl get service -n minecraft`)"
- "Pi-hole: http://pi.hole/ (add record for {{ load_balancer_server_ip }} to /etc/hosts)"
tags: ['debug']
tags: ['debug']
46 changes: 23 additions & 23 deletions roles/wordpress/templates/mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,31 @@ spec:
tier: mariadb
spec:
containers:
- image: tobi312/rpi-mariadb:10.3
name: mariadb
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-pass
key: password
ports:
- containerPort: 3306
- image: tobi312/rpi-mariadb:10.3
name: mariadb
volumeMounts:
- name: mariadb-persistent-storage
mountPath: /var/lib/mariadb
resources:
limits:
cpu: '1'
memory: '512Mi'
requests:
cpu: '500m'
memory: '256Mi'
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-pass
key: password
ports:
- containerPort: 3306
name: mariadb
volumeMounts:
- name: mariadb-persistent-storage
mountPath: /var/lib/mariadb
resources:
limits:
cpu: '1'
memory: '512Mi'
requests:
cpu: '500m'
memory: '256Mi'
volumes:
- name: mariadb-persistent-storage
persistentVolumeClaim:
claimName: mariadb-pv-claim
- name: mariadb-persistent-storage
persistentVolumeClaim:
claimName: mariadb-pv-claim

---
apiVersion: v1
Expand Down
50 changes: 25 additions & 25 deletions roles/wordpress/templates/wordpress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,33 @@ spec:
tier: frontend
spec:
containers:
- image: wordpress:5.4-apache
name: wordpress
env:
- name: WORDPRESS_DB_HOST
value: wordpress-mariadb
- name: WORDPRESS_DB_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-pass
key: password
ports:
- containerPort: 80
- image: wordpress:5.4-apache
name: wordpress
volumeMounts:
- name: wordpress-persistent-storage
mountPath: /var/www/html
resources:
limits:
cpu: '1'
memory: '512Mi'
requests:
cpu: '500m'
memory: '256Mi'
env:
- name: WORDPRESS_DB_HOST
value: wordpress-mariadb
- name: WORDPRESS_DB_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-pass
key: password
ports:
- containerPort: 80
name: wordpress
volumeMounts:
- name: wordpress-persistent-storage
mountPath: /var/www/html
resources:
limits:
cpu: '1'
memory: '512Mi'
requests:
cpu: '500m'
memory: '256Mi'
volumes:
- name: wordpress-persistent-storage
persistentVolumeClaim:
claimName: wp-pv-claim
- name: wordpress-persistent-storage
persistentVolumeClaim:
claimName: wp-pv-claim

---
apiVersion: v1
Expand Down

0 comments on commit 2afff86

Please sign in to comment.