Setup Ansible and AWS CLI to use multiple access keys
This jaunty little powershell profile will give you a multicolor prompt, and will change the username red when your running in administrator context.
This article assumes that you've uploaded a custom avatar to your Google chrome identity already.
Since I build an internal glossary at pretty much every organization I join, I figure it's about time to start writing down the most common definitions here that I reference globally:
Policy: A guideline or statement of position with respect to a given topic.
systemctl list-units --type service --all systemctl status [service] systemctl enable [service]
firewall-cmd --list-all firewall-cmd --get-services cat /usr/lib/firewalld/services/[service].xml firewall-cmd --permanent --add-service=[service] firewall-cmd --add-port=[port]/[tcp or udp] firewall-cmd --reload
getsebool -a | grep [service] setsebool -P [service]
This is a simple Python script one can use to bring a single server stack online with a new Elastic IP. Note that sometimes you'll have properties nested within properties, such as the rules nested within the security group below. The only way to define these that I've found is by defining them within the property -- that is, one cannot define them outside the "Properties" tag of the current resource. Network interfaces are also an example of this.
One of the surprises that Python contains is that it appears to only pass variables by reference, which I'm sure will get me in hot water with Python gurus but walking and quacking like a duck will get you called a duck. In any case, something very useful that one might want to do in troposphere is to make value-based copies of AWS resources. While technically this is impossible, one can accomplish the net same affect with a simple for-each loop:
#!/bin/bash #Common Prep #--------------------- yum update -y yum install -y vim perl htop tree #RHEL -- nmcli general hostname puppet.frankencloud.net #AWSLinux -- perl -pi -e 's/HOSTNAME=localhost.localdomain/HOSTNAME=puppet.frankencloud.net/g' /etc/sysconfig/network perl -pi -e 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config perl -pi -e 's/ - set_hostname/# - set_hostname/g' /etc/cloud/cloud.cfg perl -pi -e 's/ - update_hostname/# - update_hostname/g' /etc/cloud/cloud.cfg
There's a lot of misinformation about where to get your Python libs. For a repo you can trust, simply cut and past the following commands:
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install -y python34.x86_64
Sometimes in AWS you'll need to manipulate the default Python version using the following command:
alternatives --set python /usr/bin/python[V.v]
Fetch Puppet Enterprise:
curl -L -o pe-latest.tgz 'https://pm.puppetlabs.com/cgi-bin/download.cgi?dist=el&rel=7&arch=x86_64&ver=latest'
Install script to run from an agent:
curl -k https://[hostname]:8140/packages/current/install.bash | bash
Discover / authorize nodes waiting on signing by the master:
puppet cert list puppet cert sign [hostname] puppet cert list -a
Puppet agent commands
puppet agent -t
Look for errors in Puppet Code
puppet parser validate groups/wheel.pp