Note: For Ansible installation on Mac, I will highly recommend using package installation. This will avoid additional step to manually create configure file such as install from the source or using brew install.
Only your control node needs to have ansible to be installed on
easy_install is extremely convenient. But it is also lacking of dependency manager. The most common error you will see is "DistributionNotFound" for certain package(s). To fix it -
Initial Installation
Note: For Ansible installation on Mac, I will highly recommend using package installation. This will avoid additional step to manually create configure file such as install from the source or using
brew install
.sudo easy_install pip
sudo pip install ansible
You should have something look like this:
Troubleshooting on Configuration
easy_install is extremely convenient. But it is also lacking of dependency manager. The most common error you will see is "DistributionNotFound" for certain package(s). To fix it -
install package individually
uninstall pip and reinstall
a fresh reinstall
Create ansible hosts inventory file
Ad-Hoc ansible command
Examples:
ansible webservers -m ping
ansible webservers -s -C -m yum -a "name=httpd state=latest"
Playbook
Install boto to connect S3 bucket
sudo pip install boto
Install awscli Tool on OSX
This will install the most recent version of awscli
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
install awscli tool to your preferred location
./awscli-bundle/install -b my/preferred/path/aws
get PATH from workspace
export $PATH | grep my/preferred/path
add awscli path to your env PATH
export PATH=my/preferred/path:$PATH
OR
create symbolic link from your PATH
ln -s my/preferred/path/aws /user/local/bin/aws
Upload files to S3 bucket using ansible
Sync S3 repo to EC2 node
Update Security Key Pairs Using Boto
Reference:
Boto Config