diff options
Diffstat (limited to 'roles/mostdiscussed/tasks/main.yml')
| -rw-r--r-- | roles/mostdiscussed/tasks/main.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/roles/mostdiscussed/tasks/main.yml b/roles/mostdiscussed/tasks/main.yml new file mode 100644 index 0000000..64109fa --- /dev/null +++ b/roles/mostdiscussed/tasks/main.yml @@ -0,0 +1,40 @@ +- name: git clone mostdiscussed.com + remote_user: horus + git: + repo: git@git.iamfabulous.de:curious-web + dest: /home/horus/code/mostdiscussed.com + accept_hostkey: yes + #ssh_opts: "-o StrictHostKeyChecking=no" + #notify: restart nagios-nrpe-server + +- name: git clone mostdiscussed-crawler + remote_user: horus + git: + repo: git@git.iamfabulous.de:curious-crawler + dest: /home/horus/code/mostdiscussed.com-crawler + accept_hostkey: yes + +- name: get go dependencies to build + remote_user: horus + ansible.builtin.shell: go mod tidy + args: + chdir: /home/horus/code/mostdiscussed.com-crawler + +- name: compile mostdiscussed.com-crawler (make build) + remote_user: horus + ansible.builtin.shell: make build + args: + chdir: /home/horus/code/mostdiscussed.com-crawler + +- name: set cronjob for mostdiscussed.com-crawler + ansible.builtin.cron: + name: "crawlt top stories on HN" + minute: "*/30" + user: "horus" + job: "/home/horus/code/mostdiscussed.com-crawler/mostdiscussed-crawler -s -c /home/horus/code/mostdiscussed.com-crawler/config.json" + +- name: copy config.json + remote_user: horus + copy: + src: config.json + dest: /home/horus/code/mostdiscussed.com-crawler/config.json |
