Skip to content
Snippets Groups Projects
Verified Commit 59065142 authored by Jérôme Charaoui's avatar Jérôme Charaoui :telescope:
Browse files

replace deprecated lsbdistcodename fact

parent 390a0188
No related branches found
No related tags found
No related merge requests found
......@@ -780,7 +780,7 @@ As a bonus, this query will show the number of hosts running each release:
This will show all hosts running Debian bookworm:
curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=nodes { facts { name = "lsbdistcodename" and value = "bookworm" }}' | jq -r .[].certname
curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=inventory[certname] { facts.os.distro.codename = "bookworm" }' | jq -r ".[].certname"
* Using [howto/cumin](howto/cumin)
......
......@@ -89,7 +89,7 @@ block certain upgrades. If you want to bypass that, use regular `apt`:
Another example, this will upgrade all servers running `bookworm`:
cumin -b 10 'F:lsbdistcodename=bookworm' 'apt update ; unattended-upgrade ; TERM=doit dsa-update-apt-status'
cumin -b 10 'F:os.distro.codename=bookworm' 'apt update ; unattended-upgrade ; TERM=doit dsa-update-apt-status'
# Special cases and manual restarts
......@@ -301,7 +301,7 @@ defined to `justdoit` or `rotation`:
Another example, this will reboot all hosts running Debian `bookworm`:
./reboot -H $(ssh puppetdb-01.torproject.org "curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=nodes { facts { name = \"lsbdistcodename\" and value = \"bookworm\" }}'" | jq -r .[].certname | sort -R)
./reboot -H $(ssh puppetdb-01.torproject.org "curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=inventory[certname] { facts.os.distro.codename = \"bookworm\" }'" | jq -r '.[].certname' | sort -R)
## Rebooting Ganeti nodes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment