diff --git a/Vagrantfile b/Vagrantfile index 7fe9710..2d7cde3 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -20,8 +20,8 @@ Vagrant.configure("2") do |config| # argument is a set of non-required options. config.vm.synced_folder ".", "/var/www/pilbox", :owner => "vagrant" - # Enable provisioning with Puppet stand alone. Puppet manifests - # are contained in a directory path relative to this Vagrantfile. + # Enable provisioning with Ansible. Ansible playbooks are contained + # in a directory path relative to this Vagrantfile. config.vm.provision :ansible do |ansible| ansible.playbook = "provisioning/playbook.yml" ansible.inventory_path = "provisioning/vagrant" diff --git a/provisioning/files/etc/init.d/pilbox b/provisioning/files/etc/init.d/pilbox index ff60931..816f572 100644 --- a/provisioning/files/etc/init.d/pilbox +++ b/provisioning/files/etc/init.d/pilbox @@ -1,4 +1,13 @@ #!/bin/sh +### BEGIN INIT INFO +# Provides: pilbox +# Required-Start: $local_fs $remote_fs $syslog +# Required-Stop: $local_fs $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Enables pilbox service +# Description: Enables pilbox service +### END INIT INFO set -e diff --git a/provisioning/playbook.yml b/provisioning/playbook.yml index 58298a7..bc2061a 100644 --- a/provisioning/playbook.yml +++ b/provisioning/playbook.yml @@ -4,7 +4,7 @@ # ansible-playbook -i playbook.yml # # VERSION 0.1 -# ANSIBLE-VERSION 1.2.2 +# ANSIBLE-VERSION 2.3.0 - hosts: vagrant user: vagrant @@ -74,7 +74,7 @@ command: update-rc.d pilbox defaults - name: running pilbox check - service: name=pilbox state=running enabled=yes + service: name=pilbox state=started enabled=yes handlers: - name: restart pilbox