notthebee / infra Goto Github PK
View Code? Open in Web Editor NEWIaC for my Linux/Unix machines
License: Do What The F*ck You Want To Public License
IaC for my Linux/Unix machines
License: Do What The F*ck You Want To Public License
Hi,
I have a question, how this rule is intended to work?
And what is result in /etc/fstab?
Thanks
Hey Wolfgang, would you mind sharing an example of this? Thanks for sharing the project, great work mate
(installing on an Ubuntu server 20.04)
Hey, i am trying to adapt your playbook to my usage and during my exploration of every role, found an error during the installation of crowdsec.
- name: Add Crowdsec GPG apt Key
apt_key:
url: https://packagecloud.io/crowdsec/crowdsec/gpgkey
state: present
https://docs.github.com/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
- name: Add Crowdsec Repository
apt_repository:
repo: deb https://packagecloud.io/crowdsec/crowdsec/ubuntu bionic stable
state: present
These two tasks do not allow for crowdsec to be installed with apt (with the next task in the file). I tried a bit on my side, and found this workaround :
- name: add Crowdsec repo and gpg apt key
shell:
cmd: curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash
This task fixes the issue and allows to install crowdsec.
(BTW, ty very much for this repository and your videos, you have given me a nice objective to work for as i try to create my own private server. Hope this will help!)
Hello,
There are a lot of variables that are not defined like: namecheap_host, blog_host, host_local etc.
Could you update the host_vars/all/vars.yml file?
Thank you!
"Try root" has the same register name as "Try default credentials", I think it should be:
register: _ssh_port_root_result
{% for item in web_applications if "media" in item.category and item.url != "" %}
could you send a example of the config for that?
Some disclaimers before I continue this:
I've been heavily editing the code for my own purposes and the bug may not show up, but I did try to make sure it appeared in the original.
Essentially the code breaks down at "Stop and remove all the disabled containers" inside the docker role. This seems to be because the docker user isn't set up yet even though the user is added to the docker group above.
I found two fixes to this but there may be better ways about this.
Hey,
sorry for bothering (the community) but what are the supposed post-installation steps? I hoped to gain that experience from your Ansible videos, but sadly they're discontinued.
I built my server and ran the Ansible playbook successfully, how to continue?
Thanks in advance.
If it is not too sensitive, can I ask you why you want each container joining a kind of personal network apart from the internal/external one? I think Docker will create those as "bridge/nat" by default and by the way each container will be the only peer in its own network. I guess I am missing something.
EDIT: I noticed it's just photoprism and nextcloud, so maybe it's something related to mariadb?
infra/roles/containers/services/photoprism/tasks/main.yml
Lines 79 to 83 in 7ce4288
infra/roles/containers/services/nextcloud/tasks/main.yml
Lines 57 to 61 in 7ce4288
minute: "0"
or you will have those executed at every minute.The issue I am facing is that SWAG is serving the its default welcome page (the one mentioning linuxserver.io), either when going to 192.168.1.x or using its public address (or name). I see that the two docker networks (internal and public) are created, all docker services are joined accordingly to one docker network or the other. Subdomain configurations are copied and loaded by SWAG. I don't get the reason or where to look deeper.
Some info:
$ docker network inspect swag_internal_network
---
...
"1dffff2839ec87b3287634735ae2da7574dde6bc34913a625f12c30ee4b8e6f9": {
"Name": "homer",
"EndpointID": "9cdc8d599f26ca01e11dc1472bf70440295b3655fe3b4dfb3548172b43590b49",
"MacAddress": "02:42:ac:12:00:08",
"IPv4Address": "172.18.0.8/16",
"IPv6Address": ""
},
"39b227b6a17ec4f898f1cad059d897cf6774707e47814ef11aa60e46ea9521a3": {
"Name": "radarr",
"EndpointID": "594c489df6e30d1302e625d15eb6654a293fc5f3d570e6ff4db44c8265f77c2b",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
...
$ docker logs swag_internal
---
...
**** The following reverse proxy confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare them to the samples in the same folder to make sure you have the latest updates. ****
/config/nginx/proxy-confs/sonarr.subdomain.conf
/config/nginx/proxy-confs/radarr.subdomain.conf
/config/nginx/proxy-confs/photoprism.subdomain.conf
/config/nginx/proxy-confs/jackett.subdomain.conf
/config/nginx/proxy-confs/homer.subdomain.conf
[cont-init.d] 70-templates: exited 0.
[cont-init.d] 90-custom-folders: executing...
[cont-init.d] 90-custom-folders: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Server ready
...
I don't want to bother much here, I think it's something specific to my setup, I am just asking here maybe a little hint where I should look closely to debug this issue. Is there a default access log for swag?
EDIT: I found an hint. Basically, 192.168.1.x is served by swag_public
. I don't think that is expected, isn't it?
... ghcr.io/linuxserver/swag "/init" ... 80/tcp, 0.0.0.0:443->443/tcp swag_public
... ghcr.io/linuxserver/swag "/init" ... 80/tcp, 443/tcp swag_internal
I did so many changes that now I am not sure anymore but I guess this made the trick to enable this service.
https://github.com/notthebee/infra/blob/main/roles/network/cloudflare-ddns/defaults/main.yml#L2
container_name: cloudflare-ddns
--> container_name: cloudflare
Have followed the steps in your readme, only run into the following:
fatal: [home]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute 'nextcloud'\n\nThe error appears to be in '/home/hpower/infra/roles/containers/swag/tasks/main.yml': line 36, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Populate the dictionary of all containers\n ^ here\n" }
First, let me see if I understood the logic behind your filesystem layout (once MergerFS is in action):
{{ mergerfs_root }}
...maybe the only exception being the transcoding folder that bypasses cache directly.minfreespace=500G
, which must be bigger than the percentage of free space preserved by the un-caching script.Correct?
My question now is:
Hi Wolfgang, newbie question. I understood SWAG comes in two instances: one internal with most services supposed to be used in the LAN and one public (eg. nextCloud, authelia, ...). I understand that for the public you need either a personal domain you can validate with cloudflare or a free subdomain (like duckdns) that you can validate with the specific plugin. But what about the internal one? Has to be validated anyway? I see you are using *.box
, that's fine.
*.server
, I though any name could work, but nginx complains about that not being a valid domain name (i.e. it wants something like domain.com). Is your a compliant one?Installed a Ubuntu 20.04 in Vmware for test, only failed on:
TASK [network/swag : Populate the dictionary of all containers] ******************************************************** fatal: [home]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.parsing.yaml.objects.AnsibleUnicode object' has no attribute 'nextcloud'\n\nThe error appears to be in '/home/hpower/infra/tasks/list_services.yml': line 27, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Populate the dictionary of all containers\n ^ here\n"}
Hi,
I was trying to adapt this repo to my use, but I can't get it to work. I get the "[WARNING]: Could not match supplied host pattern, ignoring: fleet"
I'm trying to run in locally on my ubuntu vm, so I changed hosts file to
[kombajn]
127.0.0.1 ansible_user=[redacted] ansible_connection=local
I tried for the subfolder in the host_vars to be named both "kombajn" and "127.0.0.1", but it doesn't seem to make a difference.
I am a complete noob at ansible, the only playbook that I used in the past is Jeff Geerling's internet-pi, but I hope you can help me.
Hi,
can you please add a license file to this repo? Without a license this repo should be considered as non-free software and therefore unusable by third parties.
Thank you, have a nice day
Because the ports beside this range may be used by some thing else (this range is used by dynamic ports see https://en.wikipedia.org/wiki/Ephemeral_port?wprov=sfla1)
Hi, is it possible to create an in-depth video/documentation about your ansible playbook and if possible make it available for Linux/Windows Subsystem for Linux as well, as these options are more often used than MacOS. Thanks.
Can you make a Ubuntu 20.04 port or at least a guide on Mac replacement commands for Ubuntu
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.