Created
October 17, 2018 12:10
-
-
Save stefanhorning/784d5af4f6430a89e9976480eb68d3fa to your computer and use it in GitHub Desktop.
Ansible play to test aws_codepipeline module
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
- name: Playbook to test CodePipeline module | |
hosts: localhost | |
vars: | |
aws_region: us-east-1 | |
codebuild_iam_role_arn: 'arn:aws:iam::XXX:role/codepipeline-service-role' | |
tasks: | |
- name: CodePipeline project task | |
aws_codepipeline: | |
name: test-ansible | |
role_arn: "{{ codebuild_iam_role_arn }}" | |
artifact_store: | |
type: S3 | |
location: foo | |
stages: | |
- name: step_1 | |
actions: | |
- name: action | |
actionTypeId: | |
category: Source | |
owner: AWS | |
provider: S3 | |
version: '1' | |
configuration: | |
S3Bucket: foo | |
S3ObjectKey: bar | |
outputArtifacts: | |
- { name: step_one_output } | |
- name: step_2 | |
actions: | |
- name: action | |
actionTypeId: | |
category: Build | |
owner: AWS | |
provider: CodeBuild | |
version: '1' | |
inputArtifacts: | |
- { name: step_one_output } | |
outputArtifacts: | |
- { name: step_two_output } | |
configuration: | |
ProjectName: foo | |
region: "{{ aws_region }}" | |
state: present | |
register: output | |
- name: Debug out | |
debug: | |
var: output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: IAM role must exist