Skip to content

Commit b45be7e

Browse files
committed
ansible: install aws cli on release builders
1 parent e3059d7 commit b45be7e

File tree

17 files changed

+301
-0
lines changed

17 files changed

+301
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
3+
github: deekayen
4+
ko_fi: deekayen
5+
liberapay: deekayen
6+
custom: ["paypal.me/deekayen", "venmo.com/drdnorman", "buymeacoff.ee/deekayen"]
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: CI
3+
'on':
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
11+
test:
12+
name: Molecule
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
distro:
17+
- centos7
18+
- centos8
19+
- debian9
20+
- debian10
21+
22+
steps:
23+
- name: Check out the codebase.
24+
uses: actions/checkout@v2
25+
26+
- name: Set up Python 3.
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: '3.x'
30+
31+
- name: Install test dependencies.
32+
run: pip install --upgrade --upgrade-strategy eager -r requirements.txt
33+
34+
- name: Link repo folder to a proper galaxy alias.
35+
run: cd ../ && ln -s ansible-role-awscli2 deekayen.awscli2 && cd ansible-role-awscli2
36+
37+
- name: Run Molecule tests.
38+
run: molecule test
39+
env:
40+
PY_COLORS: '1'
41+
ANSIBLE_FORCE_COLOR: '1'
42+
MOLECULE_DISTRO: ${{ matrix.distro }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
3+
# repository or organization.
4+
#
5+
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
6+
# See: https://github.com/ansible/galaxy/issues/46
7+
8+
name: Release
9+
'on':
10+
push:
11+
tags:
12+
- '*'
13+
14+
defaults:
15+
run:
16+
working-directory: 'deekayen.awscli2'
17+
18+
jobs:
19+
20+
release:
21+
name: Release
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check out the codebase.
25+
uses: actions/checkout@v2
26+
with:
27+
path: 'deekayen.awscli2'
28+
29+
- name: Set up Python 3.
30+
uses: actions/setup-python@v2
31+
with:
32+
python-version: '3.x'
33+
34+
- name: Install Ansible.
35+
run: pip3 install ansible-base
36+
37+
- name: Trigger a new import on Galaxy.
38+
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.retry
2+
*/__pycache__
3+
*.pyc
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: default
3+
rules:
4+
line-length:
5+
max: 150
6+
level: warning
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2020, David Norman
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
AWS CLI v2
2+
=========
3+
4+
[![CI](https://github.com/deekayen/ansible-role-awscli2/workflows/CI/badge.svg?branch=main)](https://github.com/deekayen/ansible-role-awscli2/actions?query=workflow%3ACI) [![Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive) ![BSD 3-Clause license](https://img.shields.io/badge/license-BSD%203--Clause-blue) ![Linux platform](https://img.shields.io/badge/platform-linux-lightgrey)
5+
6+
Install AWS CLI v2 using the official install binary instead of using `pip`.
7+
8+
Requirements
9+
------------
10+
1. Outbound internet connection.
11+
2. unzip
12+
13+
Role Variables
14+
--------------
15+
16+
| variable | hints |
17+
| --- | --- |
18+
| executable_temp_dir | download location for the installer, must be executable, don't use /tmp on hardened OSes|
19+
20+
Dependencies
21+
------------
22+
23+
None.
24+
25+
Example Playbook
26+
----------------
27+
28+
Including an example of how to use your role (for instance, with variables
29+
passed in as parameters) is always nice for users too:
30+
31+
- hosts: servers
32+
roles:
33+
- deekayen.awscli2
34+
35+
License
36+
-------
37+
38+
BSD
39+
40+
Author Information
41+
------------------
42+
43+
David Norman
44+
https://github.com/sponsors/deekayen
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
3+
executable_temp_dir: /tmp
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install_date: Tue Sep 26 23:57:28 2023
2+
version: 1.1.0
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
galaxy_info:
3+
namespace: deekayen
4+
role_name: awscli2
5+
author: David Norman
6+
description: Install AWS CLI v2 using the official installer instead of pip.
7+
8+
github_branch: main
9+
issue_tracker_url: https://github.com/deekayen/ansible-role-awscli2/issues
10+
11+
license: BSD
12+
13+
min_ansible_version: 1.2
14+
15+
platforms:
16+
- name: EL
17+
versions:
18+
- 7
19+
- 8
20+
- name: Debian
21+
versions:
22+
- buster
23+
- stretch
24+
25+
galaxy_tags:
26+
- aws
27+
- awscli
28+
- awscli2
29+
30+
dependencies: []

0 commit comments

Comments
 (0)