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
import time | |
from sentence_transformers import SentenceTransformer | |
model = SentenceTransformer( | |
f"sentence-transformers/all-MiniLM-L6-v2", device="cpu" | |
) | |
suggestion = """ | |
- name: Git checkout | |
ansible.builtin.git: | |
accept_newhostkey: true |
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 | |
set -eux | |
function cleanup() | |
{ | |
echo "Something went wrong! Let's clean up." | |
} | |
trap cleanup EXIT |
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
# | |
# (c) 2022 Red Hat Inc. | |
# | |
# This file is part of Ansible | |
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) | |
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
import pytest |
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 python3 | |
import argparse | |
from datetime import datetime | |
import requests | |
import re | |
class TimedOut(Exception): |
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 python3 | |
import boto3 | |
from datetime import datetime | |
client = boto3.client("cloudtrail") | |
import json | |
instances = {} |
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 python3 | |
# Identify the minimal subset of permission required for a given Ansible playbook | |
# License: GPLv3+ | |
# Copyright: Gonéri Le Bouder <goneri@lebouder.net> | |
from pyVmomi import vim | |
from pyVim.connect import SmartConnect, SmartConnectNoSSL, Disconnect | |
import os | |
import subprocess |
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
sudo qemu-img convert -c -p -f qcow2 -O vmdk -o subformat=streamOptimized,compat6 ubuntu-2004.qcow2 ~/tmp/ubuntu-2004.vmdk-4 | |
scp ~/tmp/ubuntu-2004.vmdk-4 root@datastore.test:/srv/share/vms/test_vm1 | |
ssh root@esxi1.test vmkfstools -i /vmfs/volumes/rw_datastore/test_vm1/ubuntu-2004.vmdk-4 /vmfs/volumes/rw_datastore/test_vm1/ubuntu-2004.vmdk -d thin | |
ssh root@dataastore.test curl -o /srv/share/vms/fedora-35.vmdk-4 https://s3.us-east-2.amazonaws.com/ansible-team-cloud-images/fedora-35.vmdk-4 | |
ssh root@esxi.test mkdir -p /vmfs/volumes/rw_datastore/test_vm1 | |
ssh root@esxi1.test vmkfstools -i /vmfs/volumes/local/fedora-35.vmdk-4 /vmfs/volumes/rw_datastore/test_vm1/fedora-35.vmdk -d thin |
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 | |
job_id=$(uuidgen) | |
ansible_core_ci=$(cat ~/.ansible-core-ci.key) | |
curl -X PUT -H "Content-Type: application/json" --data '{"config": {"platform": "azure"}, "auth": {"remote": {"key": "'${ansible_core_ci}'", "nonce": null}}, "threshold": 1}' https://ansible-core-ci.testing.ansible.com/dev/azure/${job_id}| python -c 'import yaml, sys; print(yaml.dump(yaml.safe_load(sys.stdin), default_flow_style=False))' |tee session.yaml |
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
root@dragonflybsd-600-hammer2:/home/goneri # panic: no volume for offset 0x0000000040010000 | |
cpuid = 0 | |
Trace beginning at frame 0xfffff800677a7260 | |
hammer2_get_volume() at hammer2_get_volume+0x4b 0xffffffff8098334b | |
hammer2_get_volume() at hammer2_get_volume+0x4b 0xffffffff8098334b | |
_hammer2_io_getblk() at _hammer2_io_getblk+0x182 0xffffffff8095fcf2 | |
hammer2_io_new() at hammer2_io_new+0x17 0xffffffff809605f7 | |
hammer2_chain_modify() at hammer2_chain_modify+0x342 0xffffffff8096e302 | |
hammer2_chain_create() at hammer2_chain_create+0xe31 0xffffffff8096fe01 | |
Debugger("panic") |
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
Mounting root from hammer2:vbd0s3 | |
hammer2_mount: root devstr="vbd0s3" | |
hammer2_mount: dev="vbd0s3" label="DATA" rdonly=1 | |
hammer2_ondisk: "/dev/vbd0s3" zone=3 id=0 offset=0x0000000000000000 size=0x0000000322800000 | |
hammer2_ondisk: total size 0x0000000057000000 does not equal sum of volumes 0x0000000322800000 | |
Root mount failed: 22 | |
Manual root filesystem specification: | |
<fstype>:<device> Specify root (e.g. ufs:da0s1a) | |
? List valid disk boot devices |
NewerOlder