forked from theteam/vagrant-django-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated version control handling, updated checkout code, added deploy…
…ment + sshd modules.
- Loading branch information
Showing
9 changed files
with
83 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.vagrant | ||
config.yml | ||
manifests/*.pp | ||
modules/deployment/files/ssh/id_rsa | ||
modules/deployment/files/ssh/id_rsa.pub | ||
modules/deployment/files/ssh/authorized_keys |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
class aptitude { | ||
exec { "aptitude": | ||
|
||
exec { "aptitude-update": | ||
command => "/usr/bin/aptitude update", | ||
refreshonly => true; | ||
} | ||
cron { "aptitude": | ||
refreshonly => false; | ||
} | ||
|
||
cron { "aptitude-update": | ||
command => "/usr/bin/aptitude update", | ||
user => root, | ||
hour => 23, | ||
minute => 59; | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
class deployment { | ||
|
||
$deploy_user = "deployer" | ||
$deploy_group = "www-data" | ||
|
||
user {$deploy_user: | ||
name => $deploy_user, | ||
gid => $deploy_group, | ||
home => "/home/$deploy_user", | ||
shell => "/bin/bash", | ||
managehome => true, | ||
ensure => "present", | ||
} | ||
|
||
file {"/home/$deploy_user/.ssh": | ||
ensure => directory, | ||
owner => $deploy_user, | ||
group => $deploy_group, | ||
mode => 700, | ||
require => User[$deploy_user], | ||
} | ||
|
||
file {"/home/$deploy_user/.ssh/authorized_keys": | ||
ensure => present, | ||
owner => $deploy_user, | ||
group => $deploy_group, | ||
mode => 640, | ||
source => "puppet:///modules/deployment/ssh/authorized_keys", | ||
} | ||
|
||
file {"/home/$deploy_user/.ssh/id_rsa": | ||
ensure => present, | ||
owner => $deploy_user, | ||
group => $deploy_group, | ||
mode => 640, | ||
source => "puppet:///modules/deployment/ssh/id_rsa", | ||
} | ||
|
||
file {"/home/$deploy_user/.ssh/id_rsa.pub": | ||
ensure => present, | ||
owner => $deploy_user, | ||
group => $deploy_group, | ||
mode => 640, | ||
source => "puppet:///modules/deployment/ssh/id_rsa.pub", | ||
} | ||
|
||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class sshd { | ||
|
||
package { "openssh-server": | ||
ensure => installed, | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class version_control { | ||
include version_control::git | ||
include version_control::subversion | ||
include version_control::mercurial | ||
include version_control::bazaar | ||
} |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
class version_control::subversion { | ||
|
||
package { "subversion": ensure => installed } | ||
package { "subversion": | ||
ensure => installed, | ||
require => Exec["aptitude-update"]} | ||
|
||
} |