Skip to content

Commit 7e08fc9

Browse files
authored
Merge pull request #86 from cisagov/lineage/skeleton
⚠️ CONFLICT! Lineage pull request for: skeleton
2 parents a04801f + 733090c commit 7e08fc9

15 files changed

+355
-102
lines changed

.github/dependabot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,20 @@ updates:
1212
schedule:
1313
interval: "weekly"
1414
ignore:
15+
# Managed by cisagov/skeleton-generic
1516
- dependency-name: actions/cache
1617
- dependency-name: actions/checkout
18+
- dependency-name: actions/setup-go
1719
- dependency-name: actions/setup-python
20+
- dependency-name: hashicorp/setup-terraform
21+
- dependency-name: mxschmitt/action-tmate
1822

1923
- package-ecosystem: "pip"
2024
directory: "/"
2125
schedule:
2226
interval: "weekly"
2327
ignore:
28+
# Managed by cisagov/skeleton-ansible-role
2429
- dependency-name: "ansible"
2530
- dependency-name: "ansible-lint"
2631

.github/labels.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
# Rather than breaking up descriptions into multiline strings we disable that
3+
# specific rule in yamllint for this file.
4+
# yamllint disable rule:line-length
5+
- color: "eb6420"
6+
description: This issue or pull request is awaiting the outcome of another issue or pull request
7+
name: blocked
8+
- color: "000000"
9+
description: This issue or pull request involves changes to existing functionality
10+
name: breaking change
11+
- color: "d73a4a"
12+
description: This issue or pull request addresses broken functionality
13+
name: bug
14+
- color: "07648d"
15+
description: This issue will be advertised on code.gov's Open Tasks page (https://code.gov/open-tasks)
16+
name: code.gov
17+
- color: "0366d6"
18+
description: Pull requests that update a dependency file
19+
name: dependencies
20+
- color: "5319e7"
21+
description: This issue or pull request improves or adds to documentation
22+
name: documentation
23+
- color: "cfd3d7"
24+
description: This issue or pull request already exists or is covered in another issue or pull request
25+
name: duplicate
26+
- color: "b005bc"
27+
description: A high-level objective issue encompassing multiple issues instead of a specific unit of work
28+
name: epic
29+
- color: "000000"
30+
description: Pull requests that update GitHub Actions code
31+
name: github-actions
32+
- color: "0e8a16"
33+
description: This issue or pull request is well-defined and good for newcomers
34+
name: good first issue
35+
- color: "ff7518"
36+
description: Pull request that should count toward Hacktoberfest participation
37+
name: hacktoberfest-accepted
38+
- color: "a2eeef"
39+
description: This issue or pull request will add or improve functionality, maintainability, or ease of use
40+
name: improvement
41+
- color: "fef2c0"
42+
description: This issue or pull request is not applicable, incorrect, or obsolete
43+
name: invalid
44+
- color: "ce099a"
45+
description: This pull request is ready to merge during the next Lineage Kraken release
46+
name: kraken 🐙
47+
- color: "a4fc5d"
48+
description: This issue or pull request requires further information
49+
name: need info
50+
- color: "fcdb45"
51+
description: This pull request is awaiting an action or decision to move forward
52+
name: on hold
53+
- color: "ef476c"
54+
description: This issue is a request for information or needs discussion
55+
name: question
56+
- color: "7b42bc"
57+
description: Pull requests that update Terraform code
58+
name: terraform
59+
- color: "00008b"
60+
description: This issue or pull request adds or otherwise modifies test code
61+
name: test
62+
- color: "1d76db"
63+
description: This issue or pull request pulls in upstream updates
64+
name: upstream update
65+
- color: "d4c5f9"
66+
description: This issue or pull request increments the version number
67+
name: version bump
68+
- color: "ffffff"
69+
description: This issue will not be incorporated
70+
name: wontfix

.github/workflows/build.yml

+8-12
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,24 @@ jobs:
2222
uses: cisagov/setup-env-github-action@develop
2323
- uses: actions/checkout@v3
2424
- id: setup-python
25-
uses: actions/setup-python@v3
25+
uses: actions/setup-python@v4
2626
with:
2727
python-version: "3.10"
2828
# We need the Go version and Go cache location for the actions/cache step,
2929
# so the Go installation must happen before that.
30-
- uses: actions/setup-go@v2
30+
- id: setup-go
31+
uses: actions/setup-go@v3
3132
with:
32-
go-version: "1.16"
33-
- name: Store installed Go version
34-
id: go-version
35-
run: |
36-
echo "::set-output name=version::"\
37-
"$(go version | sed 's/^go version go\([0-9.]\+\) .*/\1/')"
33+
go-version: "1.19"
3834
- name: Lookup Go cache directory
3935
id: go-cache
4036
run: |
41-
echo "::set-output name=dir::$(go env GOCACHE)"
37+
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
4238
- uses: actions/cache@v3
4339
env:
4440
BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\
4541
py${{ steps.setup-python.outputs.python-version }}-\
46-
go${{ steps.go-version.outputs.version }}-\
42+
go${{ steps.setup-go.outputs.go-version }}-\
4743
packer${{ steps.setup-env.outputs.packer-version }}-\
4844
tf${{ steps.setup-env.outputs.terraform-version }}-"
4945
with:
@@ -79,7 +75,7 @@ jobs:
7975
${{ env.CURL_CACHE_DIR }}/"${PACKER_ZIP}"
8076
sudo mv /usr/local/bin/packer /usr/local/bin/packer-default
8177
sudo ln -s /opt/packer/packer /usr/local/bin/packer
82-
- uses: hashicorp/setup-terraform@v1
78+
- uses: hashicorp/setup-terraform@v2
8379
with:
8480
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
8581
- name: Install shfmt
@@ -113,7 +109,7 @@ jobs:
113109
steps:
114110
- uses: actions/checkout@v3
115111
- id: setup-python
116-
uses: actions/setup-python@v3
112+
uses: actions/setup-python@v4
117113
with:
118114
python-version: "3.10"
119115
- uses: actions/cache@v3

.github/workflows/codeql-analysis.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
# For most projects, this workflow file will not need changing; you simply need
3+
# to commit it to your repository.
4+
#
5+
# You may wish to alter this file to override the set of languages analyzed,
6+
# or to provide custom queries or build logic.
7+
name: "CodeQL"
8+
9+
on:
10+
push:
11+
# Dependabot triggered push events have read-only access, but uploading code
12+
# scanning requires write access.
13+
branches-ignore:
14+
- dependabot/**
15+
pull_request:
16+
# The branches below must be a subset of the branches above
17+
branches:
18+
- develop
19+
schedule:
20+
- cron: '0 2 * * 6'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
runs-on: ubuntu-latest
26+
permissions:
27+
# required for all workflows
28+
security-events: write
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
# Override automatic language detection by changing the below list
33+
# Supported options are go, javascript, csharp, python, cpp, and java
34+
language:
35+
- python
36+
# Learn more...
37+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v2
46+
with:
47+
languages: ${{ matrix.language }}
48+
49+
# Autobuild attempts to build any compiled languages (C/C++, C#, or
50+
# Java). If this step fails, then you should remove it and run the build
51+
# manually (see below).
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v2
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
59+
# three lines and modify them (or add more) to build your code if your
60+
# project uses a compiled language
61+
62+
# - run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v2

.github/workflows/sync-labels.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: sync-labels
3+
4+
on:
5+
push:
6+
paths:
7+
- '.github/labels.yml'
8+
- '.github/workflows/sync-labels.yml'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
labeler:
15+
permissions:
16+
# actions/checkout needs this to fetch code
17+
contents: read
18+
# crazy-max/ghaction-github-labeler needs this to manage repository labels
19+
issues: write
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Sync repository labels
24+
if: success()
25+
uses: crazy-max/ghaction-github-labeler@v4
26+
with:
27+
# This is a hideous ternary equivalent so we only do a dry run unless
28+
# this workflow is triggered by the develop branch.
29+
dry-run: ${{ github.ref_name == 'develop' && 'false' || 'true' }}

.pre-commit-config.yaml

+13-13
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ default_language_version:
55

66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.1.0
8+
rev: v4.3.0
99
hooks:
1010
- id: check-case-conflict
1111
- id: check-executables-have-shebangs
@@ -31,32 +31,32 @@ repos:
3131

3232
# Text file hooks
3333
- repo: https://github.com/igorshubovych/markdownlint-cli
34-
rev: v0.31.1
34+
rev: v0.32.2
3535
hooks:
3636
- id: markdownlint
3737
args:
3838
- --config=.mdl_config.yaml
3939
- repo: https://github.com/pre-commit/mirrors-prettier
40-
rev: v2.6.1
40+
rev: v3.0.0-alpha.4
4141
hooks:
4242
- id: prettier
4343
- repo: https://github.com/adrienverge/yamllint
44-
rev: v1.26.3
44+
rev: v1.28.0
4545
hooks:
4646
- id: yamllint
4747
args:
4848
- --strict
4949

5050
# GitHub Actions hooks
5151
- repo: https://github.com/python-jsonschema/check-jsonschema
52-
rev: 0.14.2
52+
rev: 0.18.4
5353
hooks:
5454
- id: check-github-actions
5555
- id: check-github-workflows
5656

5757
# pre-commit hooks
5858
- repo: https://github.com/pre-commit/pre-commit
59-
rev: v2.17.0
59+
rev: v2.20.0
6060
hooks:
6161
- id: validate_manifest
6262

@@ -90,11 +90,11 @@ repos:
9090
args:
9191
- --config=.bandit.yml
9292
- repo: https://github.com/psf/black
93-
rev: 22.3.0
93+
rev: 22.10.0
9494
hooks:
9595
- id: black
96-
- repo: https://gitlab.com/pycqa/flake8
97-
rev: 3.9.2
96+
- repo: https://github.com/PyCQA/flake8
97+
rev: 5.0.4
9898
hooks:
9999
- id: flake8
100100
additional_dependencies:
@@ -104,11 +104,11 @@ repos:
104104
hooks:
105105
- id: isort
106106
- repo: https://github.com/pre-commit/mirrors-mypy
107-
rev: v0.942
107+
rev: v0.990
108108
hooks:
109109
- id: mypy
110110
- repo: https://github.com/asottile/pyupgrade
111-
rev: v2.31.1
111+
rev: v3.2.0
112112
hooks:
113113
- id: pyupgrade
114114

@@ -121,14 +121,14 @@ repos:
121121

122122
# Terraform hooks
123123
- repo: https://github.com/antonbabenko/pre-commit-terraform
124-
rev: v1.64.0
124+
rev: v1.76.0
125125
hooks:
126126
- id: terraform_fmt
127127
- id: terraform_validate
128128

129129
# Docker hooks
130130
- repo: https://github.com/IamTheFij/docker-pre-commit
131-
rev: v2.1.0
131+
rev: v2.1.1
132132
hooks:
133133
- id: docker-compose-check
134134

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# skeleton-ansible-role-with-test-user #
22

33
[![GitHub Build Status](https://github.com/cisagov/skeleton-ansible-role-with-test-user/workflows/build/badge.svg)](https://github.com/cisagov/skeleton-ansible-role-with-test-user/actions)
4-
[![Total alerts](https://img.shields.io/lgtm/alerts/g/cisagov/skeleton-ansible-role-with-test-user.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/cisagov/skeleton-ansible-role-with-test-user/alerts/)
5-
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/cisagov/skeleton-ansible-role-with-test-user.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/cisagov/skeleton-ansible-role-with-test-user/context:python)
4+
[![CodeQL](https://github.com/cisagov/skeleton-ansible-role-with-test-user/workflows/CodeQL/badge.svg)](https://github.com/cisagov/skeleton-ansible-role-with-test-user/actions/workflows/codeql-analysis.yml)
65

76
This is a skeleton project that can be used to quickly get a new
87
[cisagov](https://github.com/cisagov) Ansible role GitHub project
@@ -91,8 +90,10 @@ Here's how to use it in a playbook:
9190
- hosts: all
9291
become: yes
9392
become_method: sudo
94-
roles:
95-
- skeleton
93+
tasks:
94+
- name: Include skeleton
95+
ansible.builtin.include_role:
96+
name: skeleton
9697
```
9798
9899
## New Repositories from a Skeleton ##

meta/main.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ galaxy_info:
1111
# OS family. This simplifies a lot of things for roles that support
1212
# Kali Linux, so it makes sense to force the installation of Ansible
1313
# 2.10 or newer.
14-
min_ansible_version: 2.10
14+
min_ansible_version: "2.10"
1515
namespace: cisagov
1616
platforms:
17-
- name: Amazon
17+
- name: Amazon Linux 2
1818
versions:
19-
- 2
19+
- any
2020
- name: Debian
2121
versions:
2222
- stretch
@@ -28,12 +28,14 @@ galaxy_info:
2828
- bookworm
2929
- name: Fedora
3030
versions:
31-
- 34
32-
- 35
31+
- "35"
32+
- "36"
33+
- "37"
3334
- name: Ubuntu
3435
versions:
3536
- bionic
3637
- focal
38+
- jammy
3739
role_name: skeleton_with_test_user
3840

3941
dependencies: []

0 commit comments

Comments
 (0)