This file contains hidden or 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
| Multicast DNS | |
| CentOS: | |
| yum install -y epel-release | |
| yum install -y nss-mdns avahi avahi-tools bind-utils | |
| systemctl stop firewalld | |
| systemctl enable avahi-daemon.service --now |
This file contains hidden or 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
| class dict(dict): | |
| def dig(self, *keys): | |
| try: | |
| for key in keys: | |
| self = self[key] | |
| return self | |
| except: | |
| return None |
This file contains hidden or 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 | |
| SERVER="$1" | |
| SUBJECT="$2" | |
| CONFIG="${SERVER}.conf" | |
| cat > "${CONFIG}" <<EOF | |
| [req] | |
| default_bits = 2048 | |
| prompt = no |
This file contains hidden or 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
| python -c "import random,string,crypt; | |
| randomsalt = ''.join(random.sample(string.ascii_letters,8)); | |
| print crypt.crypt('MySecretPassword', '\$5\$%s\$' % randomsalt)" | |
| SHA256 | |
| python -c "import random,string,crypt; | |
| salt = 'G3K2SYj1a0xljZAn' | |
| print crypt.crypt('letmein', '\$5\$%s\$' % salt)" |
This file contains hidden or 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
| rpm --querytags | |
| rpm -qp --queryformat '%{version}.%{release}\n' /media/dvd/Packages/centos-release-7-5.1804.el7.centos.x86_64.rpm |
This file contains hidden or 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
| assumption: | |
| /etc/openldap/ldap.conf is correct: | |
| SASL_NOCANON on | |
| URI ldaps://ipa.foo.com | |
| BASE dc=foo,dc=com | |
| TLS_CACERT /etc/ipa/ca.crt | |
| check LDAP: |
This file contains hidden or 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
| print cert | |
| ---------- | |
| # openssl x509 -in /etc/pki/tls/certs/node.foo.local.crt -text -noout | |
| $ openssl s_client -showcerts -connect node.foo.local:443 | |
| using SNI steering |
This file contains hidden or 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
| hiera -d build::variable environment=production ::fqdn=node.foo.local | |
| #or | |
| puppet lookup --explain --node node.foo.local build::variable | |
| # ------------------------------------------------ | |
| puppet resource package puppet-client-tools ensure=latest | |
| # or | |
| yum install -y puppet-client-utils |
This file contains hidden or 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
| ipa-client-install --mkhomedir --ip-address=10.0.40.100 |
This file contains hidden or 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
| yum install centos-release-scl | |
| yum install rh-ruby24-ruby-devel | |
| scl enable rh-ruby24 bash | |
| gem install bundler | |
| bundle install |