Skip to content

Commit 7e67c04

Browse files
committed
Use roles from collection, add ubuntu 22.04 and various fixes.
1 parent 12f435a commit 7e67c04

File tree

124 files changed

+485
-2227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+485
-2227
lines changed

ansible/.ansible-lint renamed to .ansible-lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ warn_list:
5757
- skip_this_tag
5858
- git-latest
5959
- experimental # experimental is included in the implicit list
60+
- yaml[commas]
61+
- yaml[line-length]
6062
# - role-name
6163

6264
# Offline mode disables installation of requirements.yml

.github/workflows/main.yml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ on:
1919

2020
jobs:
2121

22-
test:
23-
name: Test on docker
22+
test_end_to_end:
23+
name: Test on various OSes
24+
25+
runs-on: ubuntu-latest
2426

25-
runs-on: ${{ matrix.os }}
2627
strategy:
28+
fail-fast: true
2729
matrix:
28-
os: [ubuntu-20.04]
30+
os: ["ubuntu-20.04", 'ubuntu-22.04']
31+
python: ["python3.7", "python3.8", "python3.9", "python3.10"]
2932

3033
steps:
3134
- uses: actions/checkout@v2
@@ -37,5 +40,27 @@ jobs:
3740
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
3841
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
3942
40-
- name: Build
41-
run: ./docker-entrypoint.sh
43+
echo "REPOSITORY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
44+
45+
- name: Build docker image
46+
run: >
47+
docker build \
48+
-t automation:${{ matrix.os }} \
49+
-f docker/Dockerfile.${{ matrix.os }} \
50+
.
51+
52+
- name: End to end test using locally checkedout code
53+
run: >
54+
docker run automation:${{ matrix.os }} \
55+
-e GIT_BRANCH=$GIT_BRANCH \
56+
-e REPOSITORY=$REPOSITORY \
57+
-e PYTHON_VERSION=${{ matrix.python }}
58+
59+
- name: End to end test with code fetch from remote
60+
run: >
61+
docker run automation:${{ matrix.os }} \
62+
-e GIT_BRANCH=$GIT_BRANCH \
63+
-e REPOSITORY=$REPOSITORY \
64+
-e PYTHON_VERSION=${{ matrix.python }} \
65+
rm -f "/opt/automated-workstation/app/scripts/add-cronjob-debian.sh"; \
66+
/opt/docker/docker-entrypoint.sh
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
# Ansible
12
.ansibleFactsCacheDir/*
3+
*.retry

.yamllint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
3+
extends: default
4+
5+
rules:
6+
braces:
7+
max-spaces-inside: -1
8+
9+
commas:
10+
# Disable check for space after commas so that we can align our values visually.
11+
max-spaces-after: -1
12+
13+
line-length:
14+
max: 160

Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile.fullBuild

Lines changed: 0 additions & 78 deletions
This file was deleted.

Dockerfile.noIntegrationTests

Lines changed: 0 additions & 63 deletions
This file was deleted.

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
run:
2+
./scripts/one-time-debian.sh
3+
./scripts/scheduled-debian.sh
4+
5+
lint:
6+
. ./.venv/bin/activate
7+
ansible-lint -c .ansible-lint
8+
9+
prepare_env:
10+
python3.9 -m venv .venv && \
11+
. ./.venv/bin/activate && \
12+
pip install --upgrade \
13+
pip \
14+
ansible \
15+
ansible-lint \
16+
yamllint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Overview
22

3-
This is an effort to provide scripts to setup my workstation in an automated, reproducible way.
3+
This is an effort to provide scripts to setup my workstation in an automated, reproducible way. The scripts are meant to be generic and parameterised based on the provided group_vars.
44

55
## Status
66
[![ubuntu-ci status](https://github.com/amolofos/automated-workstation-setup/workflows/ubuntu-ci/badge.svg)](https://github.com/amolofos/automated-workstation-setup/actions)

ansible/00-add-cronjob.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)