Skip to content

Commit

Permalink
bump version 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangda committed Jun 20, 2021
2 parents fc3c171 + cf209ec commit 29f0200
Show file tree
Hide file tree
Showing 32 changed files with 657 additions and 118 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/develop.yaml
@@ -0,0 +1,78 @@
---
name: Develop branch workflow

on:
push:
branches:
- develop
paths-ignore:
- "**.md"

pull_request:
branches:
- develop
paths-ignore:
- "**.md"

env:
GALAXY_ROLE_NAME: christiangda.amazon_cloudwatch_agent

defaults:
run:
working-directory: "christiangda.amazon_cloudwatch_agent"

jobs:
test:
name: "Python ${{ matrix.python }} - Ansible ${{ matrix.ansible }} - OS ${{ matrix.scenario }}"
runs-on: ubuntu-latest
strategy:
matrix:
#python: [2.7, 3.9]
python: [3.9]
#ansible: ["~=2.9", "~=3.4", "~=4.1"]
ansible: ["~=4.1"]
scenario: ["centos-7", "centos-8", "ubuntu-21.04"]
#scenario: ["ubuntu-21.04"]

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: ${{ env.GALAXY_ROLE_NAME }}

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python: ${{ matrix.python }}

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install ansible ${{ matrix.ansible }} and dependencies
env:
ANSIBLE_VERSION: ${{ matrix.ansible }}
run: |
pip install ansible"$ANSIBLE_VERSION"
pip install molecule
pip install docker
pip install 'molecule[docker]'
pip install flake8
pip install selinux
pip install docker
pip install pylint
pip install rope
pip install ansible-lint
- name: Show versions
run: |
flake8 --version
molecule --version
ansible --version
python -VV
- name: Run molecule on ${{ matrix.scenario }}
env:
SCENARIO: ${{ matrix.scenario }}
run: |
molecule test --scenario-name $SCENARIO
75 changes: 75 additions & 0 deletions .github/workflows/master.yaml
@@ -0,0 +1,75 @@
---
name: Master branch workflow

on:
push:
branches:
- master
paths-ignore:
- "**.md"

pull_request:
branches:
- master
paths-ignore:
- "**.md"

env:
GALAXY_ROLE_NAME: christiangda.amazon_cloudwatch_agent

defaults:
run:
working-directory: "christiangda.amazon_cloudwatch_agent"

jobs:
test:
name: "Python ${{ matrix.python }} - Ansible ${{ matrix.ansible }} - OS ${{ matrix.scenario }}"
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.9]
ansible: ["~=4.1"]
scenario: ["centos-8"]

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: ${{ env.GALAXY_ROLE_NAME }}

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python: ${{ matrix.python }}

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install ansible ${{ matrix.ansible }} and dependencies
env:
ANSIBLE_VERSION: ${{ matrix.ansible }}
run: |
pip install ansible"$ANSIBLE_VERSION"
pip install molecule
pip install docker
pip install 'molecule[docker]'
pip install flake8
pip install selinux
pip install docker
pip install pylint
pip install rope
pip install ansible-lint
- name: Show versions
run: |
flake8 --version
molecule --version
ansible --version
python -VV
- name: Run molecule on ${{ matrix.scenario }}
env:
SCENARIO: ${{ matrix.scenario }}
run: |
molecule test --scenario-name $SCENARIO
81 changes: 81 additions & 0 deletions .github/workflows/release.yaml
@@ -0,0 +1,81 @@
---
name: Develop branch workflow

on:
push:
tags:
- "*"
paths-ignore:
- "**.md"

env:
ROLE_NAME: christiangda.amazon_cloudwatch_agent
GALAXY_ROLE_NAME: amazon_cloudwatch_agent

defaults:
run:
working-directory: "christiangda.amazon_cloudwatch_agent"

jobs:
release:
name: "Python ${{ matrix.python }} - Ansible ${{ matrix.ansible }}"
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.9]
ansible: ["~=4.1"]

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
with:
path: ${{ env.ROLE_NAME }}

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python: ${{ matrix.python }}

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install ansible ${{ matrix.ansible }} and dependencies
env:
ANSIBLE_VERSION: ${{ matrix.ansible }}
run: |
pip install ansible"$ANSIBLE_VERSION"
- name: Show versions
run: |
ansible --version
python -VV
- name: Submit Ansible Galaxy Release
run: |
ansible-galaxy role import \
--api-key ${{ secrets.ANSIBLE_GALAXY_API_KEY }} \
--role-name $GALAXY_ROLE_NAME \
--branch master \
${{ github.repository_owner }} $GALAXY_ROLE_NAME
create_github_release:
name: Create Github Release
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create Release
id: create_github_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
See the file: CHANGELOG.md
draft: false
prerelease: false
90 changes: 0 additions & 90 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions VERSION.md → CHANGELOG.md
@@ -1,11 +1,12 @@
# VERSION Details
# CHANGELOG Details

## 2.0.7

* improved molecule configuration
* added new molecule scenario for podman
* improved ansible permissions for files created by templates or copy module
* updated travis-ci configuration to support latest version of ansible
* implemented github actions
* updated OS versions supported and tested

## 2.0.6

Expand Down
17 changes: 11 additions & 6 deletions README.md
@@ -1,6 +1,7 @@
# Ansible Role: christiangda.amazon_cloudwatch_agent

[![Build Status](https://travis-ci.org/christiangda/ansible-role-amazon-cloudwatch-agent.svg?branch=master)](https://travis-ci.org/christiangda/ansible-role-amazon-cloudwatch-agent)
[![Master branch workflow](https://github.com/christiangda/ansible-role-amazon-cloudwatch-agent/actions/workflows/master.yaml/badge.svg?branch=master)](https://github.com/christiangda/ansible-role-amazon-cloudwatch-agent/actions/workflows/master.yaml)
[![Develop branch workflow](https://github.com/christiangda/ansible-role-amazon-cloudwatch-agent/actions/workflows/develop.yaml/badge.svg?branch=develop)](https://github.com/christiangda/ansible-role-amazon-cloudwatch-agent/actions/workflows/develop.yaml)
[![Ansible Role](https://img.shields.io/ansible/role/39191.svg)](https://galaxy.ansible.com/christiangda/amazon_cloudwatch_agent)

This role [Install AWS CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-first-instance.html)
Expand All @@ -12,7 +13,7 @@ The repository code is [https://github.com/christiangda/ansible-role-amazon-clou
**Features:**

* Works on [AWS EC2 instances](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html)/[On-Premise Instances](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-premise.html)
* Support different versions of Python, Ansible and Operating Systems (see the [Continuos integration matrix for details](https://travis-ci.org/christiangda/ansible-role-amazon-cloudwatch-agent))
* Support different versions of Python, Ansible and Operating Systems (see the [Continuous integration matrix for details](https://travis-ci.org/christiangda/ansible-role-amazon-cloudwatch-agent))
* Downloads and installs CloudWatch Agent from [AWS distribution package](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/verify-CloudWatch-Agent-Package-Signature.html)
* Reload service when configuration is changed
* Provides a default [agent configuration](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html) file (a minimal configuration, It is not recommended)
Expand Down Expand Up @@ -42,11 +43,14 @@ This role work on RedHat, CentOS, Amazon Linux, Debian and Ubuntu distributions
* Amazon Linux
* 2
* Ubuntu
* 18.04
* 20-04
* 14.04 (*)
* 16.04 (*)
* 18.*
* 20.*
* 21.*
* Debian
* buster (10)
* sid (unstable)
* bullseye (11)

To see the compatibility matrix of Python vs. Ansible versions see [Travis-CI build matrix](https://travis-ci.org/christiangda/ansible-role-amazon-cloudwatch-agent)

Expand Down Expand Up @@ -385,7 +389,8 @@ cd christiangda.amazon_cloudwatch_agent

### Execute the molecule test

Scenearios availables:
Scenarios available:

* default --> `--driver-name docker`
* podman --> `--driver-name podman`
* vagrant --> `--driver-name vagrant`
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

0 comments on commit 29f0200

Please sign in to comment.