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

Added support for bootstrapping OpenBSD (for running Ansible in the first place).

parent 973f1359
No related branches found
No related tags found
No related merge requests found
---
# tasks file for ansible_common
- include: openbsd_bootstrap.yml
when: openbsd_bootstrap is defined
- name: Assert
assert:
that: ansible_os_family in [ 'Debian', 'OpenBSD' ]
......
---
# Bootstrap an OpenBSD machine to be able to run Ansible on it.
- name: Install Python
raw: "PKG_PATH={{ openbsd_pkg_mirror }}/OpenBSD/$(uname -r)/packages/$(arch -s)/ /usr/sbin/pkg_add py-pip"
register: openbsd_pkg_add_python
changed_when: "'python' in openbsd_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 = {{ openbsd_pkg_mirror }}/OpenBSD/{{ ansible_distribution_release }}/packages/{{ ansible_architecture }}/'
regexp: '^installpath ='
state: present
create: yes
- name: Install Bash
openbsd_pkg:
name: bash
state: latest
......@@ -30,3 +30,5 @@ openbsd_collectd_version:
'5.6': 'collectd-4.10.2p4'
'5.7': 'collectd-5.4.1p1'
'5.8': 'collectd-5.5.0p1'
openbsd_pkg_mirror: http://www.mirrorservice.org/pub
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment