hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
[20130310] Talking to the cloud
After some more hacking, I have a basic understanding of how to start Amazon NetBSD EC2 instances using Ansible, fix the instances so they can be used as targets for further Ansible commands, and then actually talking to my herd of happy instances.

Here's a teaser:

  1. Start EC2 instances, put them into ec2-webservers group. Repeat the following command for more than one instance:
    % ansible -i hosts-HF localhost -m ec2 -a 'image=ami-a754dbce instance_type=t1.micro \
    key_name=eucaHF group=ec2-webservers'
  2. Prepare instances for Ansible (omitted - needs cleanup & automation)

  3. Use Ansible to ping all servers in the ec2-webservers group:
    % env ANSIBLE_HOSTS=./ ansible-playbook config-ec2-basic.yml
    PLAY [security_group_ec2-webservers] ********************* 
    GATHERING FACTS ********************* 
    ok: []
    ok: []
    TASK: [ping] ********************* 
    ok: []
    ok: []
    PLAY RECAP ********************* : ok=2    changed=0    unreachable=0    failed=0 : ok=2    changed=0    unreachable=0    failed=0    

[Tags: , , ]

Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 34536888
Copyright (c) Hubert Feyrer