WiP: vagrantfile fix, wordpress script, init.pp

This commit is contained in:
thomashaw
2018-03-21 22:05:55 +00:00
parent d806d727e2
commit d7e9fd5db7
3 changed files with 14 additions and 4 deletions

View File

@@ -144,7 +144,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
<%= system.name %>.vm.provision 'shell', inline: "echo \"\nauto eth1\niface eth1 inet static\n\taddress <%= resolve_network(selected_module)%>\" >> /etc/network/interfaces"
<%= system.name %>.vm.provision 'shell', inline: "echo '' > /etc/environment" %>
<% elsif @ovirt_template and @ovirt_template.include? 'debian_stretch_server_n' %>
<%= system.name %>.vm.provision 'shell', inline: "echo \"\nauto ens5\niface ens5 inet static\n\taddress <%= resolve_network(selected_module)%>\" >> /etc/network/interfaces" %>
<%= system.name %>.vm.provision 'shell', inline: "echo \"\nauto ens4\niface ens4 inet static\n\taddress <%= resolve_network(selected_module)%>\" >> /etc/network/interfaces"
<% else %>
<%= system.name %>.vm.network :<%= selected_module.attributes['type'].first %>, :ovirt__ip => "<%= resolve_network(selected_module)%>", :ovirt__network_name => '<%= "#{@options[:ovirtnetwork]}" %>'
<% end %>

View File

@@ -20,6 +20,10 @@
$params += '&language='
end
-%>
curl -L <%= @https ? '-k ': '' %><%= $url_base %>
sleep 10
curl -L --data '<%= $params %>' <%= @https ? '-k ': '' %><%= $url_base %>/wp-admin/install.php?step=2
if [ ! -f /wps ]; then
curl -L <%= @https ? '-k ': '' %><%= $url_base %>
sleep 10
curl -L --data '<%= $params %>' <%= @https ? '-k ': '' %><%= $url_base %>/wp-admin/install.php?step=2
sleep 10
touch /wps
fi

View File

@@ -43,6 +43,12 @@ class wordpress_4x {
mode => '0755',
content => template('wordpress/wordpress_conf.sh.erb'),
}
~>
cron { 'run wordpress config script':
command => '/bin/bash /wordpress_conf.sh',
user => 'root',
special => reboot,
}
# ~>
# exec { 'run wordpress config script':
# command => '/bin/bash /tmp/wordpress_conf.sh',