Created
July 5, 2012 20:19
-
-
Save squiter/3056202 to your computer and use it in GitHub Desktop.
[Abstraindo.com] Vagrant de forma simples - Esses exemplos foram utilizados no post do abstraindo, os arquivos finais irão ficar em outo gist.
This file contains hidden or 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
| <VirtualHost *:80> | |
| ServerAdmin webmaster@localhost | |
| DocumentRoot /vagrant/sites | |
| <Directory /> | |
| Options FollowSymLinks | |
| AllowOverride None | |
| </Directory> | |
| <Directory /vangrant/sites> | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride All | |
| Order allow,deny | |
| allow from all | |
| </Directory> | |
| ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | |
| <Directory "/usr/lib/cgi-bin"> | |
| AllowOverride None | |
| Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch | |
| Order allow,deny | |
| Allow from all | |
| </Directory> | |
| ErrorLog /var/log/apache2/error.log | |
| # Possible values include: debug, info, notice, warn, error, crit, | |
| # alert, emerg. | |
| LogLevel warn | |
| CustomLog /var/log/apache2/access.log combined | |
| Alias /doc/ "/usr/share/doc/" | |
| <Directory "/usr/share/doc/"> | |
| Options Indexes MultiViews FollowSymLinks | |
| AllowOverride None | |
| Order deny,allow | |
| Deny from all | |
| Allow from 127.0.0.0/255.0.0.0 ::1/128 | |
| </Directory> | |
| </VirtualHost> |
This file contains hidden or 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
| # Puppet configurations | |
| class base { | |
| ## Update apt-get ## | |
| exec { 'apt-get update': | |
| command => '/usr/bin/apt-get update' | |
| } | |
| } | |
| class http{ | |
| package { "apache2": | |
| ensure => present, | |
| } | |
| service { "apache2": | |
| ensure => running, | |
| require => Package["apache2"], | |
| } | |
| } | |
| class php{ | |
| package { "php5": | |
| ensure => present, | |
| } | |
| package { "php5-cli": | |
| ensure => present, | |
| } | |
| package { "php5-xdebug": | |
| ensure => present, | |
| } | |
| package { "php5-mysql": | |
| ensure => present, | |
| } | |
| package { "php5-imagick": | |
| ensure => present, | |
| } | |
| package { "php5-mcrypt": | |
| ensure => present, | |
| } | |
| package { "php-pear": | |
| ensure => present, | |
| } | |
| package { "php5-dev": | |
| ensure => present, | |
| } | |
| package { "php5-curl": | |
| ensure => present, | |
| } | |
| package { "php5-sqlite": | |
| ensure => present, | |
| } | |
| package { "libapache2-mod-php5": | |
| ensure => present, | |
| } | |
| } | |
| class mysql{ | |
| package { "mysql-server": | |
| ensure => present, | |
| } | |
| service { "mysql": | |
| ensure => running, | |
| require => Package["mysql-server"], | |
| } | |
| } | |
| include base | |
| include http | |
| include php | |
| include mysql |
This file contains hidden or 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
| # Puppet configurations | |
| class base { | |
| ## Update apt-get ## | |
| exec { 'apt-get update': | |
| command => '/usr/bin/apt-get update' | |
| } | |
| } | |
| class http{ | |
| package { "apache2": | |
| ensure => present, | |
| } | |
| service { "apache2": | |
| ensure => running, | |
| require => Package["apache2"], | |
| } | |
| } | |
| include base | |
| include http |
This file contains hidden or 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
| class http { | |
| define apache::loadmodule () { | |
| exec { "/usr/sbin/a2enmod $name" : | |
| unless => "/bin/readlink -e /etc/apache2/mods-enabled/${name}.load", | |
| notify => Service[apache2] | |
| } | |
| } | |
| apache::loadmodule{"rewrite":} | |
| package { "apache2": | |
| ensure => present, | |
| } | |
| service { "apache2": | |
| ensure => running, | |
| require => Package["apache2"], | |
| } | |
| } |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant::Config.run do |config| | |
| config.vm.box = "lucid32" | |
| config.vm.forward_port 80, 8080 | |
| config.vm.provision :puppet do |puppet| | |
| puppet.manifests_path = "manifests" | |
| puppet.manifest_file = "default.pp" | |
| end | |
| end |
This file contains hidden or 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
| config.vm.provision :puppet do |puppet| | |
| puppet.manifests_path = "manifests" | |
| puppet.manifest_file = "default.pp" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment