Skip to content

Commit d4dc95a

Browse files
committed
added install for keepass dependencies
also added instructions for running tool scripts from rubywarden
1 parent 08b4f7c commit d4dc95a

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,24 @@ Role Variables
2727
| rw_commit | `master` | Specific commit to be used during the checkout process. |
2828
| rw_env | `production` | Specify if we are running in production or development mode. |
2929
| rw_src | `"{{ rw_home }}/src"` | Dir to clone the rubywarden source to. |
30+
| rw_keepass | `false` | Install gems needed for importing keepass version 1 databases (version 2 is not supported)|
31+
32+
Running rubywarden tool scripts
33+
-------------------------------
34+
35+
The rubywarden scripts are installed in `/var/rubywarden/src/tools/`.
36+
37+
To run the scripts you need to set the proper environment so that the ruby gems installed into the local directory work correctly.
38+
39+
For example, to import a version 1 keepass database:
40+
41+
```
42+
RUBYWARDEN_ENV=production \
43+
PATH=/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/var/rubywarden/rb/bin \
44+
HOME=/var/rubywarden \
45+
GEM_HOME=/var/rubywarden/rb/ruby/2.6 \
46+
ruby26 tools/keepass_import.rb -f /path/to/keepass.kbdx -u <bw-user>@domain.tld
47+
```
3048

3149
Example Playbook
3250
----------------

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ rw_commit: master
1010
rw_env: production
1111
rw_home: /var/rubywarden
1212
rw_src: "{{ rw_home }}/src"
13+
rw_keepass: False
1314

1415
rw_ruby_slug: "{{ rw_ruby | regex_replace('\\.', '') }}"

tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
gem_path: "{{ rw_home }}/rb"
4141
binstub_directory: "{{ rw_home }}/rb/bin"
4242
chdir: "{{ rw_src }}"
43+
extra_args: "{% if rw_keepass %}--with keepass{% endif %}"
4344
state: present
4445

4546
- name: make the {{ rw_env }} db dir

0 commit comments

Comments
 (0)