Skip to content
Snippets Groups Projects
Commit df6cfd84 authored by nimrod's avatar nimrod
Browse files

- Merged OpenBSD bootstraping to the common role.

parent c20b4ee5
No related branches found
No related tags found
No related merge requests found
......@@ -16,10 +16,9 @@ Vagrant.configure(2) do |config|
end
config.vm.define "openbsd" do |openbsd|
openbsd.vm.hostname = "openbsd.Ansible.vagrant"
openbsd.vm.box = "tmatilai/openbsd-5.7"
#openbsd.vm.box = "twingly/openbsd-5.7-amd64"
openbsd.vm.network "forwarded_port", guest: 443, host: 8000
openbsd.vm.network "forwarded_port", guest: 80, host: 8001
end
config.vm.define "kodi" do |kodi|
......
openbsd_bootstrap: True
---
# Bootstrap an OpenBSD machine to be able to run Ansible on it.
- hosts:
- openbsd
vars:
ansible_python_interpreter: /usr/local/bin/python2.7
pkg_mirror: http://www.mirrorservice.org/pub
tasks:
- name: Install Python
raw: "PKG_PATH={{ pkg_mirror }}/OpenBSD/$(uname -r)/packages/$(arch -s)/ /usr/sbin/pkg_add py-pip"
register: pkg_add_python
changed_when: "'python' in pkg_add_python.stdout"
- name: Symlink python
file:
path: /usr/bin/python
src: /usr/local/bin/python2.7
state: link
force: yes
- name: Gather facts
setup:
- name: Configure pkg
lineinfile:
dest: /etc/pkg.conf
line: 'installpath = {{ pkg_mirror }}/OpenBSD/{{ ansible_distribution_release }}/packages/{{ ansible_architecture }}/'
regexp: '^installpath ='
state: present
create: yes
- name: Install Bash
openbsd_pkg:
name: bash
state: latest
---
- hosts:
- all
gather_facts: '{{ openbsd_bootstrap is defined }}'
roles:
- common
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment