summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dockerignore1
-rw-r--r--Dockerfile19
-rw-r--r--README.md13
-rw-r--r--local.yml0
-rwxr-xr-xsetup.sh3
5 files changed, 36 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..2d2ecd6
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+.git/
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..2668fad
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,19 @@
+FROM ubuntu:latest
+
+RUN apt-get update && \
+ apt-get install -y ansible python3-apt
+
+RUN apt-get install -y sudo \
+ && useradd -m -s /bin/bash admin \
+ && echo "admin ALL=(ALL) ALL" >> /etc/sudoers \
+ && passwd -d root
+
+RUN echo 'admin:admin' | chpasswd
+
+USER admin
+WORKDIR /home/admin
+
+COPY --chown=admin . init
+WORKDIR init
+
+CMD ["/bin/bash"]
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..935b160
--- /dev/null
+++ b/README.md
@@ -0,0 +1,13 @@
+# init
+
+## Development
+
+In order to test this, you can use *Docker* and build a simple Ubuntu container
+
+```bash
+ git clone git@github.com:nikolaosboutalas/init.git
+ cd init
+ docker build . -t ansible && docker run --rm -it ansible
+ # Inside the new running container
+ ./setup.sh
+```
diff --git a/local.yml b/local.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/local.yml
diff --git a/setup.sh b/setup.sh
new file mode 100755
index 0000000..f5e94a3
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+ansible-playbook local.yml --ask-become-pass --ask-vault-pass