Skip to content

Commit

Permalink
Merge pull request #2 from clouddrove/PR-1
Browse files Browse the repository at this point in the history
lint apply
  • Loading branch information
Sohan Yadav committed May 15, 2020
2 parents 1d0712b + f244ab3 commit 77acdfc
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 18 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
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: '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()
9 changes: 9 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
extends: default

rules:
line-length:
max: 120
level: warning
truthy:
allowed-values: ['true', 'false', 'yes', 'no']
24 changes: 12 additions & 12 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

- name: create pritunl dirs
file:
path: "{{ item|safe|trim }}"
path: "{{item|safe|trim}}"
state: directory
owner: "{{ pritunl_user }}"
group: "{{ pritunl_group }}"
owner: "{{pritunl_user}}"
group: "{{pritunl_group}}"
mode: 0755
recurse: true
with_items:
- "{{ pritunl_path }}"
- "{{pritunl_path}}"

- name: create pritunl mongo dirs
file:
path: "{{ item|safe|trim }}"
path: "{{item|safe|trim}}"
state: directory
owner: "{{ mongo_user }}"
group: "{{ mongo_group }}"
owner: "{{mongo_user}}"
group: "{{mongo_group}}"
mode: 0755
recurse: true
with_items:
- "{{ mongo_path }}"
- "{{mongo_path}}"

- name: transfer pritunl.conf
template:
dest: "{{ pritunl_path }}/pritunl.conf"
src: "{{ item }}"
dest: "{{pritunl_path}}/pritunl.conf"
src: "{{item}}"
with_items:
- config/pritunl.conf

- name: create pritunl.log
shell: touch {{ pritunl_log }}
- name: create pritunl log
shell: touch {{pritunl_log}}
1 change: 1 addition & 0 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
service:
name: pritunl
state: restarted
enabled: true
changed_when: false

- name: wait for pritunl to become ready
Expand Down
12 changes: 6 additions & 6 deletions tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

- name: setup group
group:
name: "{{ pritunl_group }}"
name: "{{pritunl_group}}"
system: false

- name: setup user
user:
name: "{{ pritunl_user }}"
name: "{{pritunl_user}}"
system: false
group: "{{ pritunl_group }}"
group: "{{pritunl_group}}"

- name: setup group
group:
name: "{{ mongo_group }}"
name: "{{mongo_group}}"
system: false

- name: setup user
user:
name: "{{ mongo_user }}"
name: "{{mongo_user}}"
system: false
group: "{{ mongo_group }}"
group: "{{mongo_group}}"

0 comments on commit 77acdfc

Please sign in to comment.