Skip to content

Instantly share code, notes, and snippets.

@illenseer
Created August 30, 2013 14:21
Show Gist options
  • Save illenseer/6390361 to your computer and use it in GitHub Desktop.
Save illenseer/6390361 to your computer and use it in GitHub Desktop.
Playbook to get all prerequest for ansible installed on FreeBSD.
---
- hosts: freebsd
gather_facts: false
user: root
tasks:
- name: install pkgng
raw: "pkg_info | grep -v 'pkg-' > /dev/null ; if $? then pkg_add -r pkg; pkg2ng; echo 'WITH_PKGNG=yes' >> /etc/make.conf; echo 'packagesite: <your_pkg_mirror>' >> /usr/local/etc/pkg.conf; pkg update; endif"
- name: install python27
raw: pkg install -y python27
- name: add ansible ssh-key
authorized_key: user=root key="{{ item }}"
with_file:
- ../ssh_keys/ansible.pub
@tomster
Copy link

tomster commented Nov 21, 2013

FWIW here's the working version that i eventually ended up with https://gist.github.com/tomster/7585211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment