Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ CONFLICT! Lineage pull request for: skeleton #65

Merged
merged 28 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9993a8c
Prefer ansible.builtin.include_role to a roles block
jsf9k Feb 27, 2023
80d6039
Alphabetize attributes
jsf9k Feb 27, 2023
ff2984a
Fix misleading task name
jsf9k Feb 27, 2023
2c1b7a1
Install Python before pip
jsf9k Feb 27, 2023
45ea09c
Add a comment explaining why Python is installed before pip
jsf9k Feb 27, 2023
bec8606
Update the dependabot ignore configuration
mcdonnnj Mar 15, 2023
744f07e
Add @jasonodoom as a default codeowner
jsf9k Mar 24, 2023
3eed760
Merge pull request #128 from cisagov/add-odoom-to-default-codeowners
jasonodoom Mar 26, 2023
8d39c8b
Use Python 3.11 for the `lint` job in the `build` workflow
mcdonnnj Apr 19, 2023
5f4b768
Merge pull request #130 from cisagov/improvement/update_python_versio…
jmorrowomni Apr 20, 2023
db5e7ff
Update pre-commit hook versions
mcdonnnj Mar 27, 2023
c9028cf
Merge pull request #129 from cisagov/maintenance/update_pre-commit_hooks
jmorrowomni Apr 20, 2023
4c595e6
Bump actions/setup-go from 3 to 4
dependabot[bot] Mar 27, 2023
847cd13
Merge pull request #127 from cisagov/dependabot/github_actions/action…
jmorrowomni Apr 20, 2023
9984792
Install/upgrade setuptools and wheel when upgrading pip
jsf9k Feb 24, 2023
7250368
Merge pull request #126 from cisagov/improvement/install-setuptools-a…
jmorrowomni Apr 20, 2023
e57185b
Merge https://github.com/cisagov/skeleton-generic into lineage/skeleton
jmorrowomni May 19, 2023
baed0ba
Merge pull request #231 from cisagov/lineage/skeleton
mcdonnnj May 22, 2023
b3e0906
Merge pull request #230 from cisagov/improvement/update_dependabot_ig…
mcdonnnj May 22, 2023
cd3a3bf
Merge pull request #226 from cisagov/improvement/prefer-include-role-…
mcdonnnj May 22, 2023
9e0fd70
Merge https://github.com/cisagov/skeleton-packer into lineage/skeleton
jmorrowomni May 22, 2023
7c6e850
Replace missing requirement
jmorrowomni May 22, 2023
8a5f82c
Move comments to match skeleton formatting
jmorrowomni May 25, 2023
49da055
Bump version from 0.1.6 to 0.1.7
jmorrowomni May 25, 2023
a17e6c8
Bump version from 0.1.7 to 0.1.7-rc.1
jmorrowomni May 25, 2023
4836612
Update Nessus playbook to use ansible.builtin.include_role
jmorrowomni May 26, 2023
8f28daf
Bump version from 0.1.7-rc.1 to 0.1.7-rc.2
jmorrowomni May 26, 2023
918c6cd
Finalize version from 0.1.7-rc.2 to 0.1.7
jmorrowomni May 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# These owners will be the default owners for everything in the
# repo. Unless a later match takes precedence, these owners will be
# requested for review when someone opens a pull request.
* @dav3r @jsf9k @mcdonnnj
* @dav3r @jasonodoom @jsf9k @mcdonnnj

# Let jsf9k own the sometimes-touchy AWS and Python playbooks, as well
# as the packer.pkr.hcl file.
Expand All @@ -13,4 +13,4 @@

# These folks own any files in the .github directory at the root of
# the repository and any of its subdirectories.
/.github/ @dav3r @felddy @jsf9k @mcdonnnj
/.github/ @dav3r @felddy @jasonodoom @jsf9k @mcdonnnj
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ updates:
- dependency-name: actions/setup-python
- dependency-name: hashicorp/setup-terraform
- dependency-name: mxschmitt/action-tmate
# Managed by cisagov/skeleton-packer
- dependency-name: aws-actions/configure-aws-credentials

- package-ecosystem: "pip"
directory: "/"
Expand All @@ -29,12 +31,14 @@ updates:
directory: "/terraform-build-user"
schedule:
interval: "weekly"
# Managed by cisagov/skeleton-packer
jsf9k marked this conversation as resolved.
Show resolved Hide resolved
ignore:
- dependency-name: "hashicorp/aws"

- package-ecosystem: "terraform"
directory: "/terraform-post-packer"
schedule:
interval: "weekly"
# Managed by cisagov/skeleton-packer
jsf9k marked this conversation as resolved.
Show resolved Hide resolved
ignore:
- dependency-name: "hashicorp/aws"
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
# We need the Go version and Go cache location for the actions/cache step,
# so the Go installation must happen before that.
- id: setup-go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: "1.19"
- name: Lookup Go cache directory
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
run: go install ${PACKAGE_URL}@${PACKAGE_VERSION}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade --requirement requirements-test.txt
- name: Install Ansible roles
run: ansible-galaxy install --force --role-file src/requirements.yml
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ repos:
args:
- --config=.mdl_config.yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.0-alpha.6
hooks:
- id: prettier
- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
rev: v1.30.0
hooks:
- id: yamllint
args:
- --strict

# GitHub Actions hooks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
rev: 0.22.0
hooks:
- id: check-github-actions
- id: check-github-workflows

# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit
rev: v3.0.2
rev: v3.2.1
hooks:
- id: validate_manifest

Expand All @@ -83,7 +83,7 @@ repos:
# Python hooks
# Run bandit on the "tests" tree with a configuration
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
name: bandit (tests tree)
Expand All @@ -98,7 +98,7 @@ repos:
name: bandit (everything else)
exclude: tests
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand All @@ -112,7 +112,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.1.1
hooks:
- id: mypy
- repo: https://github.com/asottile/pyupgrade
Expand All @@ -129,7 +129,7 @@ repos:

# Terraform hooks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.0
rev: v1.77.1
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
18 changes: 13 additions & 5 deletions src/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
name: AWS-specific roles
become: yes
become_method: sudo
roles:
- amazon_ssm_agent
- chrony_aws
- cloudwatch_agent
tasks:
- name: Install Amazon SSM Agent
ansible.builtin.include_role:
name: amazon_ssm_agent
- name: Install chrony and configure it for use within AWS
ansible.builtin.include_role:
name: chrony_aws
- name: Install and configure Amazon CloudWatch Agent
ansible.builtin.include_role:
name: cloudwatch_agent
# The instance types used for almost all the instances expose EBS
# volumes as NVMe block devices, so that's why we need nvme here.
- nvme
- name: Install prerequisites for working with NVMe block devices
ansible.builtin.include_role:
name: nvme
22 changes: 16 additions & 6 deletions src/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@
name: Setup base image
become: yes
become_method: sudo
roles:
- automated_security_updates
- banner
- clamav
- htop
- persist_journald
tasks:
- name: Install and configure automated security updates
ansible.builtin.include_role:
name: automated_security_updates
- name: Install and configure login banner
ansible.builtin.include_role:
name: banner
- name: Install and configure ClamAV
ansible.builtin.include_role:
name: clamav
- name: Install and configure htop
ansible.builtin.include_role:
name: htop
- name: Configure JournalD to preserve logs across reboots
ansible.builtin.include_role:
name: persist_journald
10 changes: 7 additions & 3 deletions src/nessus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
name: Install Nessus and configure system for more ephemeral ports
become: yes
become_method: sudo
roles:
- role: more_ephemeral_ports
- role: nessus
tasks:
- name: Configure number of ephemeral ports
ansible.builtin.include_role:
name: more_ephemeral_ports
- name: Install Nessus
ansible.builtin.include_role:
name: nessus
vars:
package_bucket: "{{ build_bucket }}"
18 changes: 14 additions & 4 deletions src/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
name: Install pip3/python3 and remove pip2/python2
become: yes
become_method: sudo
roles:
- pip
- python
- remove_python2
tasks:
# If pip were to be installed first, then the OS _could_ pull
# different Python packages than what would be installed via the
# cisagov/ansible-role-python role; hence, the ordering below is
# more controlled.
- name: Install Python 3
ansible.builtin.include_role:
name: python
- name: Install pip3
ansible.builtin.include_role:
name: pip
- name: Uninstall Python 2
ansible.builtin.include_role:
name: remove_python2
60 changes: 30 additions & 30 deletions src/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
---
- src: https://github.com/cisagov/ansible-role-amazon-ssm-agent
name: amazon_ssm_agent
- src: https://github.com/cisagov/ansible-role-automated-security-updates
name: automated_security_updates
- src: https://github.com/cisagov/ansible-role-banner
name: banner
- src: https://github.com/cisagov/ansible-role-chrony-aws
name: chrony_aws
- src: https://github.com/cisagov/ansible-role-clamav
name: clamav
- src: https://github.com/cisagov/ansible-role-cloudwatch-agent
name: cloudwatch_agent
- src: https://github.com/cisagov/ansible-role-htop
name: htop
- src: https://github.com/cisagov/ansible-role-more-ephemeral-ports
name: more_ephemeral_ports
- src: https://github.com/cisagov/ansible-role-nessus
name: nessus
- src: https://github.com/cisagov/ansible-role-nvme
name: nvme
- src: https://github.com/cisagov/ansible-role-persist-journald
name: persist_journald
- src: https://github.com/cisagov/ansible-role-pip
name: pip
- src: https://github.com/cisagov/ansible-role-python
name: python
- src: https://github.com/cisagov/ansible-role-remove-python2
name: remove_python2
- src: https://github.com/cisagov/ansible-role-upgrade
name: upgrade
- name: amazon_ssm_agent
src: https://github.com/cisagov/ansible-role-amazon-ssm-agent
- name: automated_security_updates
src: https://github.com/cisagov/ansible-role-automated-security-updates
- name: banner
src: https://github.com/cisagov/ansible-role-banner
- name: chrony_aws
src: https://github.com/cisagov/ansible-role-chrony-aws
- name: clamav
src: https://github.com/cisagov/ansible-role-clamav
- name: cloudwatch_agent
src: https://github.com/cisagov/ansible-role-cloudwatch-agent
- name: htop
src: https://github.com/cisagov/ansible-role-htop
- name: more_ephemeral_ports
src: https://github.com/cisagov/ansible-role-more-ephemeral-ports
- name: nessus
src: https://github.com/cisagov/ansible-role-nessus
- name: nvme
src: https://github.com/cisagov/ansible-role-nvme
- name: persist_journald
src: https://github.com/cisagov/ansible-role-persist-journald
- name: pip
src: https://github.com/cisagov/ansible-role-pip
- name: python
src: https://github.com/cisagov/ansible-role-python
- name: remove_python2
src: https://github.com/cisagov/ansible-role-remove-python2
- name: upgrade
src: https://github.com/cisagov/ansible-role-upgrade
6 changes: 4 additions & 2 deletions src/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
name: Upgrade base image
become: yes
become_method: sudo
roles:
- upgrade
tasks:
- name: Upgrade all packages
ansible.builtin.include_role:
name: upgrade
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.6"
__version__ = "0.1.7"
Loading