Last active
January 20, 2016 21:25
-
-
Save mdekstrand/af112b6b12c68949554f to your computer and use it in GitHub Desktop.
Provisioning task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set +e | |
# This script just uses Ansible to bootstrap things | |
apt-get -y install ansible wget | |
wget -O /tmp/provision.yaml https://gist.githubusercontent.com/mdekstrand/af112b6b12c68949554f/raw/provision.yaml | |
echo 127.0.0.1 >/tmp/inventory | |
ansible-playbook -i /tmp/inventory --connection=local /tmp/provision.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: 127.0.0.1 | |
connection: local | |
sudo: no | |
tasks: | |
- name: remove unneeded base packages | |
apt: name=joe state=absent purge=yes | |
- name: update base packages | |
apt: upgrade=dist update_cache=yes | |
- name: install editors and utilities | |
apt: name={{item}} state=latest | |
with_items: | |
- vim | |
- emacs-nox | |
- nano | |
- mc | |
- git | |
- tmux | |
- htop | |
- name: install python environment support | |
apt: name={{item}} state=latest | |
with_items: | |
- python3 | |
- python3-dev | |
- python3-venv | |
- python3-pip | |
- python3-virtualenv | |
- virtualenv | |
- libssl-dev | |
- libffi-dev | |
- name: install Apache web server | |
apt: name={{item}} state=latest | |
with_items: | |
- apache2 | |
- libapache2-mod-wsgi-py3 | |
- name: activate WSGI support | |
apache2_module: name=wsgi state=present | |
- name: activate Apache | |
service: name=apache2 state=started enabled=yes | |
- name: install system for Let's Encrypt | |
apt: name={{item}} state=latest | |
with_items: | |
- python-dev | |
- python-pip | |
- python-virtualenv | |
- name: install Let's Encrypt | |
pip: | |
virtualenv: /opt/letsencrypt | |
name: letsencrypt | |
state: latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment