Sha256: f71172b29540ced903dc4ff143159162bea11f006e25de9387a089a880ade9fb

Contents?: true

Size: 474 Bytes

Versions: 52

Compression:

Stored size: 474 Bytes

Contents

Puppet::Type.type(:a2mod).provide(:debian) do
    desc "Manage Apache 2 modules on Debian-like OSes (e.g. Ubuntu)"

    commands :encmd => "a2enmod"
    commands :discmd => "a2dismod"

    defaultfor :operatingsystem => [:debian, :ubuntu]

    def create
        encmd resource[:name]
    end

    def destroy
        discmd resource[:name]
    end

    def exists?
        mod= "/etc/apache2/mods-enabled/" + resource[:name] + ".load"
        File.exists?(mod)
    end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
puppet-2.7.26 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-2.7.25 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-2.7.24 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.2 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.1 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.1.rc3 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.1.rc2 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.1.rc1 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.0 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.0.rc3 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.3.0.rc2 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.4 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-2.7.23 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.3 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.3.rc1 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.2 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-2.7.22 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.1 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.1.rc1 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb
puppet-3.2.0.rc2 spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb