diff options
| author | admin | 2023-12-18 23:17:41 +0100 |
|---|---|---|
| committer | admin | 2023-12-18 23:17:41 +0100 |
| commit | 2adc886e5c0c72b8c6560050c4edd30ea9fdbb56 (patch) | |
| tree | 82355ec311bf14bdcac403834be313d8a368c6c1 /roles/mostdiscussed/tasks/main.yml | |
| parent | 64dfd20134ee028cc865745d8d8bfec31299ff0a (diff) | |
| download | ansible-2adc886e5c0c72b8c6560050c4edd30ea9fdbb56.tar.gz | |
add role for mostdiscussed.com
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 |
