init
This commit is contained in:
commit
44255e2625
9 changed files with 55 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
rootfs.tar
|
||||
1
ansible/playbook.retry
Normal file
1
ansible/playbook.retry
Normal file
|
|
@ -0,0 +1 @@
|
|||
default
|
||||
10
ansible/playbook.yml
Normal file
10
ansible/playbook.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- hosts: default
|
||||
any_errors_fatal: yes
|
||||
roles:
|
||||
- role: packages
|
||||
tags:
|
||||
- packages
|
||||
- role: auth
|
||||
tags:
|
||||
- auth
|
||||
3
ansible/roles/auth/tasks/debug.yml
Normal file
3
ansible/roles/auth/tasks/debug.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: enable root user w/o password (CHANGEME!)
|
||||
command: "sed -i 's/^root.*$/root:::0:99999:7:::/' /etc/shadow"
|
||||
2
ansible/roles/auth/tasks/main.yml
Normal file
2
ansible/roles/auth/tasks/main.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
- import_tasks: debug.yml
|
||||
10
ansible/roles/packages/tasks/debian.yml
Normal file
10
ansible/roles/packages/tasks/debian.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- name: install debian packages
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
with_items:
|
||||
- bash
|
||||
- htop
|
||||
- systemd-sysv
|
||||
2
ansible/roles/packages/tasks/main.yml
Normal file
2
ansible/roles/packages/tasks/main.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
- import_tasks: debian.yml
|
||||
22
packer.json
Normal file
22
packer.json
Normal 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
4
setup.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
cat /proc/sys/kernel/random/uuid > /.build_uuid
|
||||
apt-get update
|
||||
apt-get -y install python
|
||||
Loading…
Add table
Add a link
Reference in a new issue