Browse Source

First commit

Signed-off-by: Blagovest Petrov <blagovest@petrovs.info>
master
Blagovest Petrov 2 years ago
commit
98d03602fc
  1. 27
      lxd-ansible-local.json
  2. 6
      playbook/example-playbook.yml
  3. 4
      playbook/roles/acme-firstfive/README.md
  4. 19
      playbook/roles/acme-firstfive/defaults/main.yml
  5. 9
      playbook/roles/acme-firstfive/tasks/main.yml

27
lxd-ansible-local.json

@ -0,0 +1,27 @@
{
"provisioners": [
{
"type": "shell",
"inline": "[ \"$(ansible --version > /dev/null && echo ok)\" != 'ok' ] && apt update && apt -y install ansible || echo 'ansible already installed.'"
},
{
"type": "ansible-local",
"playbook_file": "./playbook/example-playbook.yml",
"playbook_dir" : "./playbook"
}
],
"builders": [
{
"type": "lxd",
"name": "acme-focal",
"image": "ubuntu-daily:focal",
"output_image": "acme_ubuntu-focal",
"init_sleep": "10",
"publish_properties": {
"description": "Focal image by ACME corp."
}
}
]
}

6
playbook/example-playbook.yml

@ -0,0 +1,6 @@
---
- hosts: 127.0.0.1
connection: local
roles:
- playbook/roles/acme-firstfive

4
playbook/roles/acme-firstfive/README.md

@ -0,0 +1,4 @@
## acme-firstfive
Ansible role for deployment of the first 5 minutes of a server.

19
playbook/roles/acme-firstfive/defaults/main.yml

@ -0,0 +1,19 @@
---
firstfive_packages:
- openssh-server
- curl
- wget
- httpie
- zsh
- vim
- git
- tmux
- htop
- sysstat
- screen
- unzip
- unrar
- sl
- mc
- cowsay

9
playbook/roles/acme-firstfive/tasks/main.yml

@ -0,0 +1,9 @@
---
- name: Install must-have packages
apt:
name: "{{ firstfive_packages }}"
state: present
update_cache: yes
Loading…
Cancel
Save