-
-
Save smiklosovic/183c5929d38acfe29282 to your computer and use it in GitHub Desktop.
bootstrap a freebsd 9.2 host with ansible. it requires a password for the root user to be set for which it will prompt you (-k). you must use the paramiko transport to allow password based login. based on https://gist.github.com/illenseer/6390361
This file contains 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
--- | |
# run this with ansible-playbook -i ansible_hosts bootstrap.yml -k -c paramiko | |
- hosts: jails_host | |
gather_facts: false | |
remote_user: root | |
tasks: | |
- name: install pkgng | |
raw: "pkg_info | grep -v 'pkg-' > /dev/null ; if $? pkg_add -r pkg; rehash ; pkg2ng; echo 'WITH_PKGNG=yes' >> /etc/make.conf; echo 'packagesite: http://pkgbeta.freebsd.org/freebsd%3A9%3Ax86%3A64/latest' >> /usr/local/etc/pkg.conf; pkg update ; pkg upgrade -y" | |
- name: install python27 | |
raw: "pkg install -y python27" | |
- name: add ansible ssh-key | |
authorized_key: user=root key="{{ item }}" | |
with_file: | |
- ~/.ssh/identity.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment