From f2256be7e4a3f1b3f169e3c11014d25dea7404bb Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 29 Dec 2023 22:37:55 +0100 Subject: new role ghrss --- roles/ghrss/tasks/main.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 roles/ghrss/tasks/main.yml (limited to 'roles/ghrss/tasks') diff --git a/roles/ghrss/tasks/main.yml b/roles/ghrss/tasks/main.yml new file mode 100644 index 0000000..0c44fdc --- /dev/null +++ b/roles/ghrss/tasks/main.yml @@ -0,0 +1,46 @@ +- name: git clone ghrss-crawler + remote_user: horus + git: + repo: git@git.iamfabulous.de:ghrss + dest: /home/horus/code/ghrss + accept_hostkey: yes + +#- name: go mod init +# remote_user: horus +# ansible.builtin.shell: go mod init ghrss +# args: +# chdir: /home/horus/code/ghrss + +- name: get go dependencies to build + remote_user: horus + ansible.builtin.shell: go mod tidy + args: + chdir: /home/horus/code/ghrss + +- name: compile ghrss-crawler (make build) + remote_user: horus + ansible.builtin.shell: make build + args: + chdir: /home/horus/code/ghrss + +- name: set cronjob for ghrss-crawler nr1 + ansible.builtin.cron: + name: "crawlt Github" + minute: "50" + hour: "12" + user: "horus" + job: "/home/horus/code/ghrss/ghrss --config=/home/horus/app/ghrss/ --ignore-robots-txt --delay 10" + +- name: set cronjob for ghrss-crawler nr2 + ansible.builtin.cron: + name: "crawlt Github" + minute: "50" + hour: "23" + user: "horus" + job: "/home/horus/code/ghrss/ghrss --config=/home/horus/app/ghrss/ --ignore-robots-txt --delay 10" + +- name: copy config.json + remote_user: horus + copy: + src: config.json + dest: /home/horus/code/ghrss/config.json -- cgit v1.2.3 From f26ecdd5da2cc21669fc2143f09c051f88b59fbc Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 1 Jan 2024 06:21:08 +0100 Subject: bugfix --- roles/ghrss/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/ghrss/tasks') diff --git a/roles/ghrss/tasks/main.yml b/roles/ghrss/tasks/main.yml index 0c44fdc..9e40068 100644 --- a/roles/ghrss/tasks/main.yml +++ b/roles/ghrss/tasks/main.yml @@ -29,7 +29,7 @@ minute: "50" hour: "12" user: "horus" - job: "/home/horus/code/ghrss/ghrss --config=/home/horus/app/ghrss/ --ignore-robots-txt --delay 10" + job: "/home/horus/code/ghrss/ghrss --config=/home/horus/code/ghrss/ --ignore-robots-txt --delay 10" - name: set cronjob for ghrss-crawler nr2 ansible.builtin.cron: @@ -37,7 +37,7 @@ minute: "50" hour: "23" user: "horus" - job: "/home/horus/code/ghrss/ghrss --config=/home/horus/app/ghrss/ --ignore-robots-txt --delay 10" + job: "/home/horus/code/ghrss/ghrss --config=/home/horus/code/ghrss/ --ignore-robots-txt --delay 10" - name: copy config.json remote_user: horus -- cgit v1.2.3 From 2600502e58c9d8d78555ae1adfcda9eb24a2e1d3 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 1 Jan 2024 06:23:49 +0100 Subject: bugfix --- roles/ghrss/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/ghrss/tasks') diff --git a/roles/ghrss/tasks/main.yml b/roles/ghrss/tasks/main.yml index 9e40068..04caaf8 100644 --- a/roles/ghrss/tasks/main.yml +++ b/roles/ghrss/tasks/main.yml @@ -23,17 +23,17 @@ args: chdir: /home/horus/code/ghrss -- name: set cronjob for ghrss-crawler nr1 +- name: set cronjob for ghrss-crawler ansible.builtin.cron: - name: "crawlt Github" + name: "crawlt Github #1" minute: "50" hour: "12" user: "horus" job: "/home/horus/code/ghrss/ghrss --config=/home/horus/code/ghrss/ --ignore-robots-txt --delay 10" -- name: set cronjob for ghrss-crawler nr2 +- name: set cronjob for ghrss-crawler ansible.builtin.cron: - name: "crawlt Github" + name: "crawlt Github #2" minute: "50" hour: "23" user: "horus" -- cgit v1.2.3