diff options
| author | admin | 2023-12-29 22:37:55 +0100 |
|---|---|---|
| committer | admin | 2023-12-29 22:37:55 +0100 |
| commit | f2256be7e4a3f1b3f169e3c11014d25dea7404bb (patch) | |
| tree | adf0d979d4f4aabb300b5254b997166802c8137f /roles/ghrss | |
| parent | 963e76aa55e4c5aec79d43dd6784c3aaf722d8bf (diff) | |
| download | ansible-f2256be7e4a3f1b3f169e3c11014d25dea7404bb.tar.gz | |
new role ghrss
Diffstat (limited to 'roles/ghrss')
| -rw-r--r-- | roles/ghrss/files/config.json | 24 | ||||
| -rw-r--r-- | roles/ghrss/tasks/main.yml | 46 |
2 files changed, 70 insertions, 0 deletions
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 |
