This commit is contained in:
Simon Bruder 2018-02-12 11:51:34 +00:00
commit 44255e2625
9 changed files with 55 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
rootfs.tar

1
ansible/playbook.retry Normal file
View file

@ -0,0 +1 @@
default

10
ansible/playbook.yml Normal file
View file

@ -0,0 +1,10 @@
---
- hosts: default
any_errors_fatal: yes
roles:
- role: packages
tags:
- packages
- role: auth
tags:
- auth

View file

@ -0,0 +1,3 @@
---
- name: enable root user w/o password (CHANGEME!)
command: "sed -i 's/^root.*$/root:::0:99999:7:::/' /etc/shadow"

View file

@ -0,0 +1,2 @@
---
- import_tasks: debug.yml

View file

@ -0,0 +1,10 @@
---
- name: install debian packages
apt:
name: "{{ item }}"
state: present
update_cache: yes
with_items:
- bash
- htop
- systemd-sysv

View file

@ -0,0 +1,2 @@
---
- import_tasks: debian.yml

22
packer.json Normal file
View file

@ -0,0 +1,22 @@
{
"variables": {
},
"builders":
[
{
"type": "docker",
"image": "debian:stretch",
"export_path": "rootfs.tar"
}
],
"provisioners": [
{
"type": "shell",
"script": "./setup.sh"
},
{
"type": "ansible",
"playbook_file": "ansible/playbook.yml"
}
]
}

4
setup.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/sh
cat /proc/sys/kernel/random/uuid > /.build_uuid
apt-get update
apt-get -y install python