We will use official box "ubuntu/xenial64" and modify it to work with Vagrant.
- Vagrantfile
 
| # PostgreSQL can be on a remote server but you'll need root privileges in Linux and superuser in PostgreSQL. | |
| # First install build tools | |
| sudo su | |
| aptitude install build-essential | |
| aptitude install postgresql-server-dev-9.4 | |
| # Clone and build the PL/pgSQL server-side debugger | 
| class AuthorForm(ModelForm): | |
| def __init__(self, *args, **kwargs): | |
| self.helper = FormHelper() | |
| self.helper.form_tag = False | |
| self.helper.layout = Layout( | |
| Field('name'), | |
| ) | |
| super(AuthorForm, self).__init__(*args, **kwargs) | |
| class Meta: | |
| model = Author | 
| from apps.images.signals import image_callback | |
| def entry_upload_path(instance, filename): | |
| return os.path.join("uploads", "blog", str(instance.id), filename) | |
| class Entry(models.Model): | |
| image = FileBrowseUploadField(max_length=250, upload_to=entry_upload_path) | |
| post_save.connect(image_callback, sender=Entry) | 
| #!/bin/bash | |
| # | |
| # Startup script for the Supervisor server | |
| # | |
| # Tested with Red Hat Enterprise Linux Server release 5.5 | |
| # | |
| # chkconfig: 2345 85 15 | |
| # description: Supervisor is a client/server system that allows its users to \ | |
| # monitor and control a number of processes on UNIX-like \ | |
| # operating systems. | 
| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: | 
| docker-machine create \ | |
| --driver=digitalocean \ | |
| --digitalocean-access-token=$DO_TOKEN \ | |
| --digitalocean-size=512mb \ | |
| --digitalocean-region=nyc3 \ | |
| --digitalocean-private-networking=true \ | |
| --digitalocean-image=ubuntu-15-04-x64 \ | |
| docker-swarm-kv-store | |
| docker $(docker-machine config docker-swarm-kv-store) run -d \ | 
Following script may be used for configuring complete and secure email server on fresh install of Debian 7. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.
postfix.sh script.
| <!-- place this in an %angular paragraph --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.css" /> | |
| <div id="map" style="height: 800px; width: 100%"></div> | |
| <script type="text/javascript"> | |
| function initMap() { | |
| var map = L.map('map').setView([30.00, -30.00], 3); | |
| L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |