Created
May 29, 2018 08:53
-
-
Save Pierozi/c5a9ee9fe9679300660dbce120a5d11b to your computer and use it in GitHub Desktop.
codedeploy_agent.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encoding: utf-8 | |
# frozen_string_literal: true | |
# | |
# Cookbook Name:: codedeploy-agent | |
# Recipe:: default | |
# | |
# Copyright 2018, continuous.lu | |
# Author: Tomasina Pierre ([email protected]) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
remote_file '/tmp/codedeploy-agent-setup' do | |
source "https://aws-codedeploy-#{node['wortimmo-webserver']['aws_region']}.s3.amazonaws.com/latest/install" | |
owner 'root' | |
group 'root' | |
mode '0755' | |
action :create | |
end | |
execute 'install-codedeploy-agent' do | |
command '/tmp/codedeploy-agent-setup auto' | |
end | |
service 'codedeploy-agent' do | |
priority 40 | |
provider Chef::Provider::Service::Systemd | |
action [:enable, :start] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment