Skip to content

Instantly share code, notes, and snippets.

---
- name: uuidgen for libvirtd config
hosts: cloudini-hosts
gather_facts: True
# facts.d will automatically be read, so that myuuidgen will be populated if it is defined
tasks:
- name: create directory for ansible custom facts
file: state=directory recurse=yes path=/etc/ansible/facts.d
- name: run uuidgen if necessary
---
- name: uuidgen for libvirtd config
hosts: cloudini-hosts
gather_facts: True
# facts.d will automatically be read, so that myuuidgen will be populated if it is defined
tasks:
- name: create directory for ansible custom facts
file: state=directory recurse=yes path=/etc/ansible/facts.d
- name: run uuidgen if necessary
---
- name: uuidgen for libvirtd config
hosts: cloudini-hosts
gather_facts: True
# facts.d will automatically be read, so that myuuidgen will be populated if it is defined
tasks:
- name: create directory for ansible custom facts
file: state=directory recurse=yes path=/etc/ansible/facts.d
- name: run uuidgen if necessary
node# cat myuuid.fact
"e48aeb68-ebb7-4e53-971d-0b4b59d242c4"
---
master# ansible cloudini-hosts -m setup -a "filter=ansible_local"
bu-x40092.appnor.net | SUCCESS => {
"ansible_facts": {
"ansible_local": {
@Znuff
Znuff / fix-me.md
Last active February 12, 2018 01:59

So, I'll say it now in full, and only if these EXACT conditions apply:

  1. If you followed the guide, and your config is something like (please notice masternodeaddr=):
rpcport=21527

port=21526
masternodeaddr=IP:21527
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqYuIV+WjH4K48SicuYpRWoGHaDsXh+PaqWo6wKv9hh0NVual00f60wtsLRUy7kTlSendi6QzXeFPpQVi+iQFiWjucLY+Mg8LTMjFjTWN1hYhN+0CraAt3Qyn+HvA1tLbTphQTbEA0IvjO5AgBO20v41CPpLrsIPwQmepwHYr+YU= znuffy@gmail.com
#!/bin/bash
daemon="smartcashd"
cli="smartcash-cli"
stopcli="stop"
# environment setup, make it pretty
tred=$(tput setaf 1)
tgreen=$(tput setaf 2)
tyellow=$(tput setaf 3)
#!/bin/bash
RELEASEFILE="https://github.com/Znuff/qbic/releases/download/v1.1.1/qbicd-linux64-v1.1.1.tar.gz"
daemon="qbicd"
cli="qbic-cli"
stopcli="stop"
# environment setup, make it pretty
tred=$(tput setaf 1)
#!/bin/bash
explorer_height=$(curl -s http://explorer.coin2fly.com/api/getblockcount)
latest_hash=$(curl -s http://explorer.coin2fly.com/api/getblockhash?index=$explorer_height)
block_to_check=$((explorer_height - 3))
explorer_hash=$(curl -s http://explorer.coin2fly.com/api/getblockhash?index=$block_to_check)
# environment setup, make it pretty
tred=$(tput setaf 1); tgreen=$(tput setaf 2); tyellow=$(tput setaf 3); tblue=$(tput setaf 4); tmagenta=$(tput setaf 5); tcyan=$(tput setaf 6); treset=$(tput sgr0); tclear=$(tput clear); twbg=$(tput setab 7)
@Znuff
Znuff / wif.md
Created May 5, 2018 20:42 — forked from t4sk/wif.md
How to convert private key to WIF

How to convert private key to WIF

0. Overview

WIF = base58check encode ([version byte][private key][checksum])

version byte = 80 for mainnet, ef for testnet and regtest

checksum = first 4 bytes of double SHA256 of private key