Skip to content

Commit

Permalink
changes for openbsd
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswayg committed Apr 8, 2020
1 parent fbcf13e commit d87b43d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openbsd-6.5-x86_64-proxmox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ packer --version
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) 2.7.10

```
apt -y install python3-pip
apt -y install python3-pip sshpass
pip3 install ansible==2.7.10
```

Expand Down
6 changes: 3 additions & 3 deletions openbsd-6.5-x86_64-proxmox/openbsd-6.5-x86_64-proxmox.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"template_description":"{{user `template_description`}}",
"memory": "{{user `vm_memory`}}",
"cores": "2",
"os": "l26",
"os": "other",
"http_directory": "http",

"node": "proxmox",
Expand All @@ -60,14 +60,14 @@
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_timeout": "15m",
"ssh_host": "10.10.10.55",
"ssh_host": "10.10.10.230",
"qemu_agent": false,
"iso_file": "local:iso/{{user `iso_filename`}}",
"unmount_iso": true,
"boot_wait": "30s",
"boot_command": [
"a<enter><wait>",
"<wait10>",
"<wait5>",
"http://{{ .HTTPIP }}:{{ .HTTPPort }}/install.conf<enter><wait>",
"<wait5>",
"i<enter><wait>"
Expand Down
1 change: 1 addition & 0 deletions openbsd-6.5-x86_64-proxmox/playbook/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ callback_whitelist = timer, profile_roles
stdout_callback = yaml
roles_path = ./roles
log_path = ./logs/server-template.log
inventory = ./hosts
3 changes: 3 additions & 0 deletions openbsd-6.5-x86_64-proxmox/playbook/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[servers]

OpenBSD ansible_host=10.10.10.230 ansible_port=22
2 changes: 1 addition & 1 deletion openbsd-6.5-x86_64-proxmox/playbook/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- src: https://github.com/chriswayg/ansible-initial-server.git
version: v1.4
#version: v1.4
17 changes: 17 additions & 0 deletions openbsd-6.5-x86_64-proxmox/playbook/server-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
# TODO: For unclear reasons, I could only get it to work with the root user in Packer
# 'become' in playbook or role tasks seem to be ignored by Packer Ansible

- name: Prepare OpenBSD for Ansible.
hosts: all
gather_facts: False
tasks:
- name: Ensure, that python is installed.
raw: pkg_add -z python-2.7
tags:
- openbsd

- name: Ensure, that python is linked to /usr/bin/python.
raw: ln -sf /usr/local/bin/python2.7 /usr/bin/python
tags:
- openbsd

- name: Initial configuration of a server.
hosts: all
vars_files:
Expand All @@ -14,3 +28,6 @@
- role: ansible-initial-server
vars:
iserver_user: "{{ vm_default_user }}"
iserver_become: su
tags:
- openbsd

0 comments on commit d87b43d

Please sign in to comment.