Created
November 22, 2013 16:31
-
-
Save jctanner/7602743 to your computer and use it in GitHub Desktop.
create an ansible test zone in smartos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imgadm import a1d74530-4212-11e3-8a71-a7247697c8f2 | |
vmadm create <<EOF | |
{ | |
"alias": "ansible" | |
,"hostname": "ansible" | |
,"zfs_root_compression": "on" | |
,"autoboot": false | |
,"brand": "joyent" | |
,"dataset_uuid": "a1d74530-4212-11e3-8a71-a7247697c8f2" | |
,"max_physical_memory": 256 | |
,"tmpfs": 256 | |
,"max_swap": 256 | |
,"quota": 42 | |
,"dns_domain": "company.com" | |
,"resolvers": [ "8.8.4.4", "8.8.8.8" ] | |
,"nics": [ | |
{ | |
"nic_tag": "admin" | |
,"ip": "172.16.0.2" | |
,"netmask": "255.240.0.0" | |
,"gateway": "172.16.0.1" | |
,"primary": true | |
} | |
] | |
} | |
EOF | |
---> | |
UUID=<output from above> | |
vmadm start $UUID | |
zlogin $UUID | |
follow through http://wiki.smartos.org/display/DOC/Installing+pkgin | |
pkgin update | |
pkgin -y in py27-yaml | |
pkgin -y in py27-jinja2 | |
pkgin -y in py27-paramiko | |
pkgin -y in git | |
git clone https://github.com/ansible/ansible.git | |
ssh-keygen -b 2048 -t rsa | |
cp .ssh/id_rsa.pub .ssh/authorized_keys | |
echo "127.0.0.1 ansible_python_interpreter=/opt/local/bin/python" >inventory | |
. ansible/hacking/env-setup | |
ansible all -c smart -i ~/inventory -m ping |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment