Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve bug #1

Merged
merged 1 commit into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ Followiing things includes in this role:
```yaml
pritunl_version: "latest"
pritunl_path: "/opt/pritunl"
pritunl_mongo_path: "/opt/pritunl/mongo"
pritunl_log: "/var/log/pritunl.log"
pritunl_user: pritunl
pritunl_group: pritunl
pritunl_mongo_user: mongo
pritunl_mongo_group: mongo
mongo_path: "/opt/pritunl/mongo"
mongo_user: mongo
mongo_group: mongo
```


Expand Down
6 changes: 3 additions & 3 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ variables: |-
```yaml
pritunl_version: "latest"
pritunl_path: "/opt/pritunl"
pritunl_mongo_path: "/opt/pritunl/mongo"
pritunl_log: "/var/log/pritunl.log"
pritunl_user: pritunl
pritunl_group: pritunl
pritunl_mongo_user: mongo
pritunl_mongo_group: mongo
mongo_path: "/opt/pritunl/mongo"
mongo_user: mongo
mongo_group: mongo
```

# How to install project
Expand Down
9 changes: 5 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ pritunl_version: "latest"

# Pritunl settings
pritunl_path: "/opt/pritunl"
pritunl_mongo_path: "/opt/pritunl/mongo"
pritunl_log: "/var/log/pritunl.log"

pritunl_user: pritunl
pritunl_group: pritunl
pritunl_mongo_user: mongo
pritunl_mongo_group: mongo

# Mongo settings
mongo_path: "/opt/pritunl/mongo"
mongo_user: mongo
mongo_group: mongo
6 changes: 3 additions & 3 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
file:
path: "{{ item|safe|trim }}"
state: directory
owner: "{{ pritunl_mongo_user }}"
group: "{{ pritunl_mongo_group }}"
owner: "{{ mongo_user }}"
group: "{{ mongo_group }}"
mode: 0755
recurse: true
with_items:
- "{{ pritunl_mongo_path }}"
- "{{ mongo_path }}"

- name: transfer pritunl.conf
template:
Expand Down
6 changes: 3 additions & 3 deletions tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

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

- name: setup user
user:
name: "{{ pritunl_mongo_user }}"
name: "{{ mongo_user }}"
system: false
group: "{{ pritunl_mongo_group }}"
group: "{{ mongo_group }}"
2 changes: 1 addition & 1 deletion templates/pritunl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker rm -f -v pritunl || :

docker run -u root --net=host --rm --name pritunl \
-v "{{ pritunl_path }}":/var/lib/pritunl \
-v "{{ pritunl_mongo_path }}":/var/lib/mongodb \
-v "{{ mongo_path }}":/var/lib/mongodb \
-v "{{ pritunl_path }}/pritunl.conf":/etc/pritunl.conf \
-v "{{ pritunl_log }}":{{ pritunl_log }} \
clouddrove/pritunl:{{ pritunl_version }}