# $OpenBSD: relayd.conf,v 1.4 2018/03/23 09:55:06 claudio Exp $
An API generally doesn't want to restrict a request's origin. However, some things don't work well with
Access-Control-Allow-Origin: *. So, the way around that is to just mirror back the Origin that a client sends. This apache config sets
Access-Control-Allow-* headers when it receives an
Origin header from a client, and mirrors the requested Origin back in the
ec2: error: unrecognized arguments
This is almost certainly caused by placing the EC2 dynamic inventory script in you project's ./library directory. What's happening is that the dynamic inventory python script has the same name as the default EC2 module. Therefore, it overloads the default module at runtime. Put your dynamic inventory scripts in the root directory of your project to avoid this problem.
Last week, the Republican Party of the United States exposed the personal voting information of 220 million registered voters on S3. Granting wide open permissions in S3 is a common occurrence in public cloud, and as an administrator I can attest to the fact that if you're not looking for it, you're almost certainly exposed in one area or another of your organization, and exploits are straightforward and well-known.
I couldn't sleep tonight so I took a challenge with Python to create some fractals in Turtle. I had fun coming up with the solution so I thought I'd blog about it here. Thank you, Dr. Ian Parberry, for your algorithms analysis class all those years ago. I use the techniques you taught me every day!
Here is the lab I worked on: Python Fractal Labs
I solved this problem in three steps.
Ansible Tower has two critical components that control its Python dependency path:
- The "awx" user
- The /var/lib/awx/venv/ansible/bin/activate virtual environment
If you're going to successfully run complex pip deployments, you must deploy into this virtual environment as this user.
Let's say you want to query some information for one of your instances, like the volumes associated with it:
Using the AWS CLI, you might do something like this to traverse the lists within lists:
aws ec2 describe-instances --instance-ids i-3e9217aa --query Reservations[*].Instances[*].BlockDeviceMappings[*] .Ebs.VolumeId
Assuming your using an Ansible dynamic inventory, you can traverse the sub-lists of your inventory like this:
git clone https://github.com/[USERNAME]/[PROJECT].git git remote set-url origin firstname.lastname@example.org:[USERNAME]/[PROJECT].git Add to .bash_profile: ---------------- if [ -z "$SSH_AUTH_SOCK" ] ; then eval `ssh-agent -s` ssh-add /home/ec2-user/.ssh/id_rsa_github ssh-add -l fi ---------------- Log out & log back in ssh -T email@example.com
Update your entire repository
Capture a command's conversation with a local socket
strace -e trace=read,write -s 2048 <command>