nowboarding

u/nowboarding


r/linuxquestions•

I entered the list of ips into nftables to whitelist them (wrapping it in a define like https://wiki.nftables.org/wiki-nftables/index.php/Simple_ruleset_for_a_server)

173.245.48.0/20
103.21.244.0/22
103.22.200.0/22
103.31.4.0/22
141.101.64.0/18
108.162.192.0/18
190.93.240.0/20
188.114.96.0/20
197.234.240.0/22
198.41.128.0/17
162.158.0.0/15
172.64.0.0/13
131.0.72.0/22
104.16.0.0/13
104.24.0.0/14

But the generated rule (sudo nft list ruleset) combines 2 of them. What is happening to create 104.16.0.0-104.27.255.255?

{ 103.21.244.0/22, 103.22.200.0/22, 103.31.4.0/22, 104.16.0.0-104.27.255.255, 108.162.192.0/18, 131.0.72.0/
23

r/ansible•

I do ansible host1 -m setup but don't get the full console output of the facts for that host, it just confirms that it succeeded with ok. I need to run ansible-playbook with the debug module and print out hostvars.host1. How to show all the facts ad hoc and not have to use a playbook?

The command I ran used to work before I think. https://docs.ansible.com/ansible/latest/collections/ansible/builtin/setup_module.html also says ad hoc ansible command should print facts on console.

15

r/ansible•

If you have a client and server role for a particular application, and in your infrastructure at least 1 host needs the server role applied, and all others need the client role applied, how can you do it in a maintainable way?

I think the best would be to apply client role to all hosts with a when condition that is false if the host has server in its list of roles. How can you get this list?

21

r/debian•

Can you see which packages will be available in the upcoming debian 11? And what versions they will be? Is there some kind of repository (git or the actual apt repo) where you can see what the debian developers have decided will be the various versions of packages will go into debian 11?

If it's not already available will it become available at some point before the actual release? It will help with planning certain deploy issues.

012


r/archlinux•

If you have btrfs snapshots and delete them, df command doesn't immediately update. Sometimes when there's a very large number of snapshots deleted it could take a couple of minutes to finish updating.

Is there a way to see the progress of this update task?

I noticed that sometimes my computer fan starts to spin louder when btrfs has to clean up a large number of snapshots, but surprisingly I don't see anything in my top command related to this.

I took a guess and tried doing pidof btrfs to see if I could find the process just out of curiosity but nothing was there. What is the process name I could look at if I want to see this btrfs cleanup task in progress?

Or does it not work li

102

r/grafana•

Is there any way to back up dashboards as plain text rather than having to back up the whole sqlite db? I want to check in and version my dashboard configs in git. It would also help with provisioning grafana on new machines. And would be useful in case the db gets corrupted for whatever reason.

Dashboard setup is configuration not data so should be possible to handle as plain text.

32

r/ansible•

How can we configure ansible not to show the details of the output for tasks that didn't change anything? Just the heading would be enough (when using -vv verbosity). It's a lot of output and not always necessary especially in development.

I use the yaml or debug callback plugin. Do they have any configuration I can use for this or would I have to write a custom callback plugin for this or patch their code?

93

r/ansible•

I want to call a role multiple times for the same hosts but provide different variable values for each time the role runs. There's documentation about this but it says you can provide different "role parameters" and says that's not the same as providing different variable values.

https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#passing-different-parameters

If you pass different parameters in each role definition, Ansible runs the role more than once. Providing different variable values is not the same as passing different role parameters. You must use the roles keyword for this behavior, since import_role and include_role do not accept role parameters.

Wh

1510

r/PostgreSQL•

I want to install postgres (on debian) with an existing data directory at /var/lib/postgresql, but installation gives this error.

Setting up postgresql-13 (13.3-1.pgdg100+1) ...
Configuring already existing cluster (configuration: /etc/postgresql/13/main, data: /var/lib/postgresql/13/main, owner: 106:113)
Error: move_conffile: required configuration file /var/lib/postgresql/13/main/postgresql.conf does not exist
Error: could not create default cluster. Please create it manually with", "", "  pg_createcluster 13 main --start", "", "or a similar command (see 'man pg_createcluster').

I'm provisioning a new system, so I don't want to restore the old /etc/postgresql along with t

21

r/Terraform•

null_resource lets you run a provisioner when anything changes. https://www.terraform.io/docs/language/resources/provisioners/null_resource.html shows how to do it.

I copied that snippet to trigger the provisioner when any digitalocean_droplet is added or removed.

resource "null_resource" "null" {
  triggers = {
    ids = "${join(",", digitalocean_droplet.*.id)}"
  }
  provisioner "local-exec" {
    command = "touch file"
  }
}

But I get an error A reference to a resource type must be followed by at least one attribute access, specifying the resource name. Do you see what's wrong?

413

r/ansible•

I have a jinja loop like this that loops through each things variable for a given host. It works except when the host doesn't have that variable things defined.

  {% for thing in host.things %}
    {{ thing }}
  {% endfor %}

So then I need to wrap it in an if and then it doesn't give the error.

{% if 'things' in host %}
  {% for thing in host.things %}
    {{ thing }}
  {% endfor %}
{% endif %}

I'm using this pattern in many places so is there a way to combine the if and for to a single line using some feature of jinja? This would make the code a bit clearer.

For example for thing in host.things if 'things' in host or `for thing in setdefault(

54


r/archlinux•

Switched recently to pipewire. I'm using Dunst notification manager and when I log in to the computer on startup I get 2 Dunst notifications from pipewire. I never got these with pulseaudio. Is there a setting to disable this?

44