Sha256: 8ef0706ea1c8b510070db101f17fa9d175e74c79a2c3e5348aefb86ba2a52574

Contents?: true

Size: 671 Bytes

Versions: 2

Compression:

Stored size: 671 Bytes

Contents

include_recipe 'command'

node.reverse_merge!(
  certbot: {
    cron: {
      user: 'root',
      file_path: '/etc/cron.d/itamae-certbot',
    },
  }
)

node.validate! do
  {
    certbot: {
      cron: {
        user: string,
        file_path: string,
      },
    }
  }
end

template node[:certbot][:cron][:file_path] do
  variables user: node[:certbot][:cron][:user],
            command: node[:certbot][:command]
  source 'templates/etc/cron.d/itamae-certbot.erb'
end

service_name = case node[:platform]
               when 'amazon'
                 'crond'
               else
                 'cron'
               end

service service_name do
  action :start
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
itamae-plugin-recipe-certbot-0.3.1 lib/itamae/plugin/recipe/certbot/cron.rb
itamae-plugin-recipe-certbot-0.3.0 lib/itamae/plugin/recipe/certbot/cron.rb