Skip to content

Instantly share code, notes, and snippets.

View aisuhua's full-sized avatar
:octocat:
Flying

aisuhua aisuhua

:octocat:
Flying
  • 黑暗帝国
  • 广东深圳
View GitHub Profile
@aisuhua
aisuhua / auto_tags.py
Created April 10, 2024 11:14 — forked from rkrzr/auto_tags.py
Automatically generate ansible tags of the same name for each role in a playbook
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
@aisuhua
aisuhua / google-font-dl.py
Created January 30, 2024 05:20 — forked from fedir/google-font-dl.py
Script to download google fonts locally (for web development off-line, for example). Use : python getAllGoogleFonts.py Dosis
#!/usr/bin/env python
#
# Downloader for Google Web Fonts
#
# For usage information run with "--help"
#
# Works on Python 2.6 and later, 3 and later
# Requires tinycss (and argparse for Python 2.6) from pip
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@aisuhua
aisuhua / rhel5.ks
Created December 5, 2023 04:25 — forked from jbarber/rhel5.ks
RHEL5 kickstart example
# Example Kickstart config file for RHEL5, change $VARIABLES to suitable values
# for your site
# Usage from linux kernel boot prompt:
# linux ks=http://$SERVER_ADDR/ks/rhel5-example.ks ip=$IPADDR netmask=$NETMASK gateway=$GATEWAY [nokill] [keymap=pt-latin1] [noipv6] [debug]
#
# More boot options at http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/ch-bootopts-x86.html
# Options for this section can be found at http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/s1-kickstart2-options.html
install
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
# url --url="http://nas1.racinrandall.com/repo/centos/7/os/x86_64/"
# Use CD for Install
cdrom
# Use graphical install
text #graphical
# Run the Setup Agent on first boot
@aisuhua
aisuhua / _install.sh
Created October 16, 2023 09:27 — forked from dontlaugh/_install.sh
fluent-bit install on Centos6
#!/bin/bash
# centos6 build
yum install -y glibc zlib-static flex-devel wget
fb_version="fluent-bit-1.2.1"
wget https://fluentbit.io/releases/1.2/$fb_version.tar.gz
tar -xzf $fb_version.tar.gz
cd ${fb_version}/build
@aisuhua
aisuhua / Copy-sosrerport-from-Node-using-oc-debug.md
Created September 7, 2023 09:20 — forked from jovemfelix/Copy-sosrerport-from-Node-using-oc-debug.md
How to Copy sosrerport from Node using oc debug? Not ssh!

How to Copy Files from NODE using oc cp?

At Openshift 4.x that recomends using oc debug instead of ssh bellow I'll explain how to do it.

At Terminal 01

Start Node DEBUGING

$ oc debug node/k8sdemo-hxvrp-master-2
# remember to change chroot /host
@aisuhua
aisuhua / nginx-centos7.yml
Created August 26, 2023 02:55 — forked from icasimpan/nginx-centos7.yml
Sample ansible playbook to install nginx with sample page on CentOS7
## Credits to John Lieske - https://www.ansible.com/blog/getting-started-writing-your-first-playbook
---
- name: Install nginx
hosts: host.name.ip
become: true
tasks:
- name: Add epel-release repo
yum:
name: epel-release
@aisuhua
aisuhua / ocp4-ImagePrunerDegraded.md
Created May 26, 2023 14:41 — forked from ruo91/ocp4-ImagePrunerDegraded.md
OpenShift v4.x - ImagePrunerDegraded: Job has reached the specified backoff limit

OpenShift v4.x - ImagePrunerDegraded: Job has reached the specified backoff limit

본 이슈는 내부 레지스트리인 image-registry의 Operator 상태가 Degraded로 발생하는 이슈이다.

해당 버그 리포트를 살펴보면 OCP v4.4 버전에서도 발생했던 사항으로,
이슈가 발생하는 시점은 image-registry operator의 managementState를 Removed 상태에서 pruner job이 생성이 될때까지 기다리면 발생한다. (현재 OCP v4.6은 managementState는 Removed가 기본)

1. 이슈

[root@bastion ~]# oc describe clusteroperators image-registry | grep 'ImagePrunerDegraded'

os_http_be.map and os_sni_passthrough.map are both just empty files
@aisuhua
aisuhua / README.md
Created March 6, 2022 06:51 — forked from magnetikonline/README.md
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

Microsoft active directory servers will default to offer LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.