darkraiden.ansible-codedeploy-agent
Codedeploy Agent
Ansible Role for installing the AWS Codedeploy Agent.
Requirements
None
Role Variables
Here are the variables you can use, along with their default values (see defaults/main.yml
and vars/
):
Defaults
codedeploy_agent_s3_download_bucket_name: ""
codedeploy_agent_version: latest
These refer to the Codedeploy Agent's version and the name of the bucket to download from. The bucket name usually looks like this: aws-codedeploy-your-region
(for example, aws-codedeploy-eu-west-1
). You can find more details here.
Vars
codedeploy_agent_packages:
- git
- wget
- ruby
These are the required packages to be installed for the Codedeploy Agent to work.
codedeploy_agent_s3_download_url: https://{{ codedeploy_agent_s3_download_bucket_name }}.s3.amazonaws.com/{{ codedeploy_agent_version }}/install
This is the URL to download the Codedeploy Agent from S3.
Dependencies
None
Handlers
This role includes the following handlers:
- restart the codedeploy agent - This restarts the
codedeploy-agent
service.
Test Kitchen
You can test this role using Test Kitchen. Make sure you have the following installed:
- ruby 2.x
- docker
- the following gems:
- test-kitchen
- kitchen-docker
- kitchen-ansible
$ kitchen test
This command will create the test machines, run the tests on the role, and then destroy the machines.
Write your tests
You can create your own tests by adding a new file or modifying the existing one located in the test/integration/codedeploy-agent/serverspec/localhost
directory. For more information on how to write serverspec tests, visit here.
Example Playbook
- hosts: servers
roles:
- { role: darkraiden.ansible-codedeploy-agent }
License
MIT
Author Information
This role was created in 2018 by Davide Di Mauro.
Ansible Role to provision the AWS Codedeploy Agent
ansible-galaxy install darkraiden.ansible-codedeploy-agent