From 9366d8b6d76087f07608b795df73ca1d7a23d2ef Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Fri, 5 Apr 2024 13:16:42 -0500 Subject: [PATCH] Catch up for Foundation --- .gitignore | 1 + .../files/custom/templates/home.tmpl | 16 ++++----- .../files/web-snippets/martialarts/index | 10 +++--- roles/Foundation/tasks/main.yml | 33 +++++++------------ roles/Foundation/templates/app.ini.j2 | 10 +++--- roles/Maat/files/aur.list | 23 +------------ roles/Maat/files/pacoloco.yaml | 14 -------- roles/Maat/tasks/main.yml | 8 +++++ 8 files changed, 40 insertions(+), 75 deletions(-) delete mode 100644 roles/Maat/files/pacoloco.yaml diff --git a/.gitignore b/.gitignore index 18f601c..e8292c9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ roles/Node/files/vm-definitions/** roles/ShadowArch/files/mirrorlist roles/Sharingan/files/monit/checks/availability roles/Foundation/files/custom/public/img/** +roles/Maat/files/pacoloco.yaml venv/** wiki/** **/pkg/** diff --git a/roles/Foundation/files/custom/templates/home.tmpl b/roles/Foundation/files/custom/templates/home.tmpl index 71e5007..3121b66 100644 --- a/roles/Foundation/files/custom/templates/home.tmpl +++ b/roles/Foundation/files/custom/templates/home.tmpl @@ -17,7 +17,7 @@

- + Open source security

@@ -26,7 +26,7 @@

- + Contact us anytime

@@ -36,7 +36,7 @@


diff --git a/roles/Foundation/files/web-snippets/martialarts/index b/roles/Foundation/files/web-snippets/martialarts/index index d26bfaf..39db15d 100644 --- a/roles/Foundation/files/web-snippets/martialarts/index +++ b/roles/Foundation/files/web-snippets/martialarts/index @@ -2,7 +2,7 @@
- +

@@ -16,7 +16,7 @@

- + Open-source

@@ -35,13 +35,13 @@

- + Low-cost

We are non-profit group -- we train because we feel like it makes life better, not to make money. As such, our costs are publicly documented and our rates match the same. Classes will be informed of potential changes to costs well in advance, and we use recurring payments. We want you thinking about your training, not how you're going to pay for it.

    -
  • Cost: $10 per month in-person; $5 per month livestream -- pay below.
  • +
  • Cost: Free
  • Lessons:Tuesdays 7-8:30 p.m.
  • Sparring:Tuesdays 6-7 p.m.
  • Shaolin Workouts: Saturday mornings at 8 a.m.
  • @@ -51,7 +51,7 @@

- + Real-life First

diff --git a/roles/Foundation/tasks/main.yml b/roles/Foundation/tasks/main.yml index 0816d55..f656a5e 100644 --- a/roles/Foundation/tasks/main.yml +++ b/roles/Foundation/tasks/main.yml @@ -5,12 +5,6 @@ name: - gitea - - name: BitBot - become: yes - git: - repo: https://github.com/jesopo/bitbot.git - dest: /opt/bitbot - - name: Make directories become: yes file: @@ -27,7 +21,7 @@ register: config template: src: app.ini.j2 - dest: /var/lib/gitea/custom/conf/app.ini + dest: /etc/gitea/app.ini owner: gitea group: gitea mode: 0750 @@ -65,23 +59,20 @@ owner: gitea group: gitea - - name: Service file - become: yes - register: servicefile - copy: - src: foundation.service - dest: /usr/lib/systemd/system - owner: root - group: root - mode: 0755 - - - name: Ensure default service disabled + - name: Ensure internal service disabled become: yes + ignore_errors: yes service: - name: gitea + name: foundation state: stopped enabled: no + - name: Ensure internal service is absent + become: yes + file: + path: /usr/lib/systemd/system/foundation.service + state: absent + - name: Generate pages become: yes register: custompages @@ -89,8 +80,8 @@ - name: Restart service become: yes - when: config.changed or servicefile.changed or custompages.changed + when: config.changed or custompages.changed service: - name: foundation + name: gitea state: restarted enabled: yes diff --git a/roles/Foundation/templates/app.ini.j2 b/roles/Foundation/templates/app.ini.j2 index 6c67e66..8b8fb09 100644 --- a/roles/Foundation/templates/app.ini.j2 +++ b/roles/Foundation/templates/app.ini.j2 @@ -457,8 +457,8 @@ GC_INTERVAL_TIME = 86400 SESSION_LIFE_TIME = 86400 [picture] -AVATAR_UPLOAD_PATH = data/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars +AVATAR_UPLOAD_PATH = avatars +REPOSITORY_AVATAR_UPLOAD_PATH = repo-avatars ; How Gitea deals with missing repository avatars ; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used REPOSITORY_AVATAR_FALLBACK = none @@ -501,7 +501,7 @@ FORMAT = [log] ROOT_PATH = %(GITEA_WORK_DIR)/log MODE = console -LEVEL = Info +LEVEL = Warn STACKTRACE_LEVEL = None logger.router.MODE = , logger.xorm.MODE = , @@ -516,9 +516,9 @@ BUFFER_LEN = 10000 ACCESS_LOG_TEMPLATE = {{ '{{' }}.Ctx.RemoteAddr{{ '}}' }} - {{ '{{' }}.Identity{{ '}}' }} {{ '{{' }}.Start.Format "[02/Jan/2006:15:04:05 -0700]" {{ '}}' }} "{{ '{{' }}.Ctx.Req.Method{{ '}}' }} {{ '{{' }}.Ctx.Req.RequestURI{{ '}}' }} {{ '{{' }}.Ctx.Req.Proto{{ '}}' }}" {{ '{{' }}.ResponseWriter.Status{{ '}}' }} {{ '{{' }}.ResponseWriter.Size{{ '}}' }} "{{ '{{' }}.Ctx.Req.Referer{{ '}}' }}\" \"{{ '{{' }}.Ctx.Req.UserAgent{{ '}}' }}" logger.access.MODE = console ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" -LEVEL = Info +LEVEL = Warn ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "None" -STACKTRACE_LEVEL = Critical +STACKTRACE_LEVEL = None ; Generic log modes [log.x] diff --git a/roles/Maat/files/aur.list b/roles/Maat/files/aur.list index 3a07b93..4a6189b 100644 --- a/roles/Maat/files/aur.list +++ b/roles/Maat/files/aur.list @@ -9,35 +9,23 @@ https://aur.archlinux.org/brscan4.git https://aur.archlinux.org/carbonyl-bin.git https://aur.archlinux.org/castnow-git.git https://aur.archlinux.org/ccrypt.git -https://aur.archlinux.org/chromium-pepper-flash.git -https://aur.archlinux.org/defcon.git -https://aur.archlinux.org/discord-cli-git.git https://aur.archlinux.org/discord-irc.git -https://aur.archlinux.org/downgrader.git https://aur.archlinux.org/dotnet-core-bin.git -https://aur.archlinux.org/dotnet-runtime-bin.git https://aur.archlinux.org/freeme2.git https://aur.archlinux.org/genymotion.git https://aur.archlinux.org/gnome-alsamixer.git https://aur.archlinux.org/google-chrome.git -https://aur.archlinux.org/google-earth.git https://aur.archlinux.org/googlecl.git https://aur.archlinux.org/googler.git https://aur.archlinux.org/graylog.git https://aur.archlinux.org/graylog-collector-sidecar.git -https://aur.archlinux.org/gsa.git -https://aur.archlinux.org/gstreamer0.10-ffmpeg.git https://aur.archlinux.org/gtk-xfce-engine.git -https://aur.archlinux.org/gvmd.git https://aur.archlinux.org/gyazo.git -https://aur.archlinux.org/helloworld.git https://aur.archlinux.org/injection.git https://aur.archlinux.org/inspircd.git https://aur.archlinux.org/irker.git https://aur.archlinux.org/jmtpfs.git -https://aur.archlinux.org/jpcsp.git https://aur.archlinux.org/js.git -https://aur.archlinux.org/kpcli.git https://aur.archlinux.org/lib32-glib.git https://aur.archlinux.org/libdaq.git https://aur.archlinux.org/libdwarf-20140413.git @@ -50,28 +38,22 @@ https://aur.archlinux.org/mkinitcpio-utils.git https://aur.archlinux.org/mpir.git https://aur.archlinux.org/mongodb-bin.git https://aur.archlinux.org/mongodb-tools-bin.git +https://aur.archlinux.org/mongosh-bin.git https://aur.archlinux.org/nordvpn-bin.git https://aur.archlinux.org/oinkmaster.git https://aur.archlinux.org/openresty.git -https://aur.archlinux.org/openvas-scanner.git https://aur.archlinux.org/openvisualtraceroute.git https://aur.archlinux.org/ospd.git -https://aur.archlinux.org/ospd-openvas.git -https://aur.archlinux.org/ossec-local.git -https://aur.archlinux.org/pwm.git https://aur.archlinux.org/pcmciautils.git -https://aur.archlinux.org/pdfshuffler.git https://aur.archlinux.org/pear-net-ldap2.git https://aur.archlinux.org/perl-clipboard.git https://aur.archlinux.org/perl-crypt-rijndael.git https://aur.archlinux.org/perl-expect.git -https://aur.archlinux.org/perl-file-keepass.git https://aur.archlinux.org/perl-net-sftp-foreign.git https://aur.archlinux.org/perl-php-serialization.git https://aur.archlinux.org/perl-sys-mmap.git https://aur.archlinux.org/perl-term-shellui.git https://aur.archlinux.org/php-pear.git -https://aur.archlinux.org/php-zts.git https://aur.archlinux.org/pm-utils.git https://aur.archlinux.org/powerpanel.git https://aur.archlinux.org/python-aiohttp.git @@ -92,9 +74,6 @@ https://aur.archlinux.org/savage.git https://aur.archlinux.org/self-service-password.git https://aur.archlinux.org/smarty3.git https://aur.archlinux.org/suricata.git -https://aur.archlinux.org/swfdec.git -https://aur.archlinux.org/swfdec-gnome.git -https://aur.archlinux.org/systemdjournal2gelf.git https://aur.archlinux.org/tor-browser-bin.git https://aur.archlinux.org/trid.git https://aur.archlinux.org/tt-rss-auth-ldap-git.git diff --git a/roles/Maat/files/pacoloco.yaml b/roles/Maat/files/pacoloco.yaml deleted file mode 100644 index dd95869..0000000 --- a/roles/Maat/files/pacoloco.yaml +++ /dev/null @@ -1,14 +0,0 @@ -port: 9129 -download_timeout: 3600 # download will timeout after 3600 seconds -cache_dir: /var/cache/pacoloco -purge_files_after: 360000 # 360000 seconds or 100 hours, 0 to disable -repos: - archlinux: - urls: - - http://mirrors.gigenet.com/archlinux/ - - https://mnvoip.mm.fcix.net/archlinux/ - - http://mnvoip.mm.fcix.net/archlinux/ - - http://mirrors.kernel.org/archlinux/ - - https://southfront.mm.fcix.net/archlinux/ - - http://ftp.osuosl.org/pub/archlinux/ -user_agent: Pacoloco diff --git a/roles/Maat/tasks/main.yml b/roles/Maat/tasks/main.yml index b599ce8..a62f2e9 100644 --- a/roles/Maat/tasks/main.yml +++ b/roles/Maat/tasks/main.yml @@ -17,6 +17,7 @@ - name: Maat configuration become: yes + register: aurlist copy: src: aur.list dest: /usr/local/etc/Maat/aur.list @@ -28,6 +29,13 @@ state: restarted enabled: yes + - name: Start Maat build cycle + become: yes + when: aurlist.changed + service: + name: maat.service + state: started + - name: Generate mirrorlist delegate_to: localhost run_once: yes