Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarko committed Jun 26, 2015
1 parent 72d67d6 commit c7dc71f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions hieradata/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ my::packages_no_conf:
- libxml2-dev
- libxml2-utils
- links
- dsniff #tcpkill
7 changes: 6 additions & 1 deletion modules/tomcat8/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,19 @@
require => File["${install_dir}/tomcat8"],
}
exec { 'scp_config':
command => "scp -r -i ${keypath} -o StrictHostKeyChecking=no ${from}:/opt/tomcat8/conf/\\{server.xml, tomcat-users.xml\\} ${install_dir}/tomcat8/conf/",
command => "scp -r -i ${keypath} -o StrictHostKeyChecking=no ${from}:/opt/tomcat8/conf/server.xml ${install_dir}/tomcat8/conf/ && scp -r -i ${keypath} -o StrictHostKeyChecking=no ${from}:/opt/tomcat8/conf/tomcat-users.xml ${install_dir}/tomcat8/conf/",
unless => "grep \"admin\" ${install_dir}/tomcat8/conf/tomcat_users.xml",
require => File["${install_dir}/tomcat8"],
}
file { ["${install_dir}/tomcat8/conf/server.xml","${install_dir}/tomcat8/conf/tomcat-users.xml"]:
owner => 'tomcat',
require => Exec['scp_config'],
}
exec {"clean_server.xml":
require => File["${install_dir}/tomcat8/conf/server.xml"],
command => "sed -i '128,168 d' ${install_dir}/tomcat8/conf/server.xml", ###XXX hardcoded line numbers
onlyif => "grep \"Context path\" ${install_dir}/tomcat8/conf/server.xml"
}
file { "${install_dir}/tomcat8/conf/policy.d":
require => Exec['scp_policy.d'],
ensure => directory,
Expand Down

0 comments on commit c7dc71f

Please sign in to comment.