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/files/config.json | 24 ++++++++++++++++++++++ roles/ghrss/tasks/main.yml | 46 +++++++++++++++++++++++++++++++++++++++++++ site.yml | 28 ++++++++++++++++---------- 3 files changed, 88 insertions(+), 10 deletions(-) create mode 100644 roles/ghrss/files/config.json create mode 100644 roles/ghrss/tasks/main.yml diff --git a/roles/ghrss/files/config.json b/roles/ghrss/files/config.json new file mode 100644 index 0000000..82076b6 --- /dev/null +++ b/roles/ghrss/files/config.json @@ -0,0 +1,24 @@ +$ANSIBLE_VAULT;1.1;AES256 +30326431393939626332653662353865333931313664306466356334613436613839666265633337 +6133346362316132366331363630333061306431353263310a343366666161316337303733343061 +36653834396362303564393065336339336639396636343931363465363331313734653533356566 +6561643437636236360a333561633865326266643131366365666639656163313865643831346331 +65633435303334656163663533383732326131313664663066336131373230663236663331343966 +30313462323236373639613763306537353866336232306161663630663134663635353439663334 +65653832373432323938663165636636653836376137313333386466633239383430656134333033 +32393433643231626534316432656265343063386337396266663230343564336637373236303563 +36643436633264333063396333323432623761326464373332336265646434663237636166353531 +64643438303964303233656563366639353330313064333733353435666238366631656262333164 +63346564343932653063663932393732613138326664663238613534656632333834353932366133 +65626662616130653535653335623663383832653730626531353961343637323433313266343133 +38376338303561356136663834333731313264396465653036363433353538613038393762313363 +64623365366463353965643761376438663961663866333662353534646131323730363662663532 +39333933646664383435346464653730306633666631663135396165373832313331613065303961 +63303964656366633163623835386135656163383664303733643263633232353265353430326333 +34366138626239363438666232633831343737653435613532393632343138363963376430653164 +33613932353966633063313031653632623738663863313834383032643866363030323264366532 +35666631303662663038326333373238656332366562343265363539373834643332663131376264 +61353662633164316534303666323662353461306632313564333061396232323837623635383038 +64383163623430633233316362613932316138343738333934316133316263643962303434313234 +34653739373366663534373637626532376533656230653435643538653034343336323538666661 +316362313832303263646433396335306536 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 diff --git a/site.yml b/site.yml index 50a2822..42e5c76 100644 --- a/site.yml +++ b/site.yml @@ -26,6 +26,16 @@ # ------------------------------------------------------------ +- name: common-linux + hosts: all + roles: + - common-linux + tags: + - common-linux + - common + +# ------------------------------------------------------------ + - name: set up zsh for root and horus hosts: all become: no @@ -84,16 +94,6 @@ # ------------------------------------------------------------ -- name: common-linux - hosts: all - roles: - - common-linux - tags: - - common-linux - - common - -# ------------------------------------------------------------ - - name: ssh hosts: all roles: @@ -110,6 +110,14 @@ - mostdiscussed tags: - mostdiscussed + - applications + +- name: ghrss + hosts: code + roles: + - ghrss + tags: + - ghrss - applications #the_user: "{{ ansible_user_id }}" -- 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(-) 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(-) 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 From e39b8cdfbc2e76b645bb0e7d8919d665435f0a3e Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 18 Sep 2024 22:38:34 +0200 Subject: enables console --- roles/common-linux/tasks/main.yml | 6 ++++++ roles/packages/defaults/main.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/roles/common-linux/tasks/main.yml b/roles/common-linux/tasks/main.yml index 5813a63..a83b334 100644 --- a/roles/common-linux/tasks/main.yml +++ b/roles/common-linux/tasks/main.yml @@ -24,6 +24,12 @@ path: /home/horus/code state: directory +- name: enable console + systemd: + name: serial-getty@ttyS0 + state: started + enabled: yes + #- import_tasks: cronjobs.yml diff --git a/roles/packages/defaults/main.yml b/roles/packages/defaults/main.yml index bb7c23d..4c2aaf0 100644 --- a/roles/packages/defaults/main.yml +++ b/roles/packages/defaults/main.yml @@ -15,6 +15,7 @@ default_packages_present_all: - make - golang - rsync + - needrestart # - imagemagick # - imagemagick-6.q16 -- cgit v1.2.3