File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,37 @@ Here's a configuration example to run the script every hour:
58580 * * * * docker run -v <CONFIGURATION PATH >:/app/config.yml ghcr.io/gperiard/ynab2splitwise: latest
5959```
6060
61+ #### Provision with Ansible
62+ There's an Ansible role in this project to simplify the configuration of the cronjob.
63+
64+ 1. Add this repo in your requirements.yml file:
65+ ```
66+ roles:
67+ - src: https://github.com/gperiard/ynab2splitwise.git
68+ version: v0.2.0
69+ name: ynab2splitwise
70+ ```
71+ 2. Download it.
72+ ```
73+ ansible-galaxy install -r requirements.yml
74+ ```
75+ 3. Create a playbook. Here's an example:
76+ ```yaml
77+ # cronjobs.yml
78+ ---
79+ - hosts: cronjobs.periard.ca
80+ become: true
81+ vars_file:
82+ - vault.yml # <- contains your account configuration under y2s_accounts_configuration
83+ roles:
84+ - role: ynab2splitwise
85+ y2s_config_dir: /opt/docker/ynab2splitwise
86+ ```
87+ 4 . Run it.
88+ ```
89+ ansible-playbook -i inventory cronjobs.yml
90+ ```
91+
6192## Contributing
6293Pull requests are welcome.
6394
You can’t perform that action at this time.
0 commit comments