Posts

Showing posts with the label ansible

Vagrant Ansible trick autoreload

Vagrant Ansible trick autoreload When testing Ansible scripts, its nice to have your Vagrant VM automatically re-provision itself when you change the configuration.  In this way just saving a file lets you see the VM reinstall packages and so forth, with errors appearing immediately. The following runs a tiny reprovisioning script each time your Ansible YAML files change: pip install watchmedo watchmedo shell-command --drop --pattern=*.yml --command=clear; vagrant provision download  file  now

Using ansible to install Oracle Java on an ec2 box running in the cloud

Using ansible to install Oracle Java on an ec2 box running in the cloud I am writing this down so I dont forget. I started this task but had to stop a few times, and then remember where I left off and at some point, others will need to know how to get started. Install ansible brew install ansible Install Amazon EC2 Ansible integration tool Go here and follow instructions for Amazon EC2 Ansible integration tool. You will run a Python script and setup a few environment variable. It is painless. This will create an ansible inventory file based on your EC2 environment. Start ssh agent with your key $ ssh-agent bash $ ssh-add ~ /.ssh/YOUR_KEY.pem Install ansible Oracle Java install plugin $ ansible-galaxy install ansiblebit.oracle-java Start up an EC2 box tag it as elk=elk However you like, start up an EC2 instance and tag it with the tag elk=elk. This is just the type of box. In this case, I am in the process of writing an ansible setup script for an ELK stack. Test your ansible connec...