This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml | |
... | |
[root@yagan03 rancher]# /var/lib/rancher/rke2/bin/crictl exec 49cb8ba0d8373 etcdctl --cert /var/lib/rancher/rke2/server/tls/etcd/server-client.crt --key /var/lib/rancher/rke2/server/tls/etcd/server-client.key --cacert /var/lib/rancher/rke2/server/tls/etcd/server-ca.crt member list | |
23fe8fb09d160c69, started, yagan01-60882631, https://139.229.180.1:2380, https://139.229.180.1:2379, false | |
56d45c007a1663e9, started, yagan04-8f0b5969, https://139.229.180.4:2380, https://139.229.180.4:2379, false | |
73498b2b56b52d54, started, yagan02-4a05f740, https://139.229.180.2:2380, https://139.229.180.2:2379, false | |
7c4b2fb7e89203b5, started, yagan03-01987620, https://139.229.180.80:2380, https://139.229.180.3:2379, false | |
c35e2bc4a7d42c48, started, yagan05-39f67a83, https://139.229.180.5:2380, https://139.229.180.5:2379, false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# WARNING: This operation is destructive and will overwrite data on the device. | |
# Ensure you really want to overwrite these drives. | |
for dev in $(lsblk -dn -o NAME | grep '^nvme'); do | |
# Capture parted output (quiet mode) and return code | |
parted_output=$(parted -s "/dev/$dev" print 2>&1) | |
parted_status=$? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Find the boot entry number that matches the given string | |
BOOT_ENTRY=$(efibootmgr | grep "UEFI PXE: IPv4 Intel(R) Ethernet Controller X550" | head -n 1 | awk '{print $1}' | sed 's/Boot//;s/\*//') | |
# Check if a matching boot entry was found | |
if [[ -z "$BOOT_ENTRY" ]]; then | |
echo "No matching UEFI PXE boot entry found!" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pvs | grep ceph | awk '{print $1}' | xargs -L1 /sbin/sgdisk --zap-all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# nvme-smart-check.sh | |
# | |
# This script lists all NVMe devices on the system, runs 'nvme smart-log' | |
# on each, and reports any device whose 'critical_warning' is non-zero. | |
# | |
# Exit on any error (optional; remove 'set -e' if you prefer to continue on errors) | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ cd tmp | |
~/tmp $ git clone [email protected]:lsst-it/puppet-tailscale.git | |
Cloning into 'puppet-tailscale'... | |
remote: Enumerating objects: 219, done. | |
remote: Counting objects: 100% (219/219), done. | |
remote: Compressing objects: 100% (106/106), done. | |
remote: Total 219 (delta 95), reused 206 (delta 84), pack-reused 0 (from 0) | |
Receiving objects: 100% (219/219), 51.18 KiB | 595.00 KiB/s, done. | |
Resolving deltas: 100% (95/95), done. | |
~/tmp $ cd puppet-tailscale/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"log" | |
"github.com/ceph/go-ceph/rgw/admin" | |
"github.com/pkg/errors" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[rancher-rke2-common-stable] | |
name=Rancher RKE2 Common (stable) | |
baseurl=https://rpm.rancher.io/rke2/stable/common/centos/9/noarch | |
enabled=1 | |
gpgcheck=1 | |
repo_gpgcheck=0 | |
gpgkey=https://rpm.rancher.io/public.key | |
[rancher-rke2-1.28-stable] | |
name=Rancher RKE2 1.28 (stable) | |
baseurl=https://rpm.rancher.io/rke2/stable/1.28/centos/9/x86_64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws route53 list-resource-record-sets --hosted-zone-id ZPIEHXTK3ZPMR | jq '.ResourceRecordSets' > ls.lsst.org.json | |
aws route53 list-resource-record-sets --hosted-zone-id Z2CCXZLXGUUYM5 | jq '.ResourceRecordSets' > cp.lsst.org.json | |
./r53_to_file_sd.rb ls.lsst.org.json cp.lsst.org.json > /home/jhoblitt/github/k8s-cookbook/fleet/lib/snmp-exporter-pre/files/sd/dev/snmp-raritan-pdu.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env ruby | |
require 'yaml' | |
require 'json' | |
inv = YAML.load_file('auto_inventory.yml') | |
def find_hosts(parent, h, output) | |
h.each {|k, v| | |
if v.is_a?(Hash) |
NewerOlder