Skip to content

Instantly share code, notes, and snippets.

@Juraci
Last active August 29, 2015 14:26
Show Gist options
  • Save Juraci/e7852e1e1bda7c3ace08 to your computer and use it in GitHub Desktop.
Save Juraci/e7852e1e1bda7c3ace08 to your computer and use it in GitHub Desktop.
Ansible Session
[defaults]
transport = ssh
---
- hosts: web
remote_user: vagrant
sudo: yes
tasks:
- name: Update the apt index
apt: update_cache=yes
- name: Install apache2 package
apt: name=apache2 state=latest
- name: Start apache service
service: name=apache2 state=started
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.define :web do |web_config|
web_config.vm.network :private_network, ip: "192.168.33.47"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment