Prepare Assignment 8 secure delivery and rollback
Add the locked pricing service, trusted-agent pipeline, Ansible deployments, security gates, recovery runbooks, prerequisite evidence, and preparation manual. Prepared with Codex assistance. Vincent explicitly authorized this local commit and will handle the push. Assessed releases and recovery exercises remain pending.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
python -m venv /tmp/tools
|
||||
/tmp/tools/bin/python -m pip install --disable-pip-version-check -r /workspace/delivery/agent/requirements.in
|
||||
/tmp/tools/bin/python -m pip freeze > /workspace/delivery/agent/requirements.txt
|
||||
/tmp/tools/bin/ansible-galaxy collection install -r /workspace/delivery/ansible/requirements.yml -p /tmp/collections
|
||||
/tmp/tools/bin/ansible-galaxy collection list -p /tmp/collections --format json > /tmp/collections.json
|
||||
/tmp/tools/bin/python - <<'PY'
|
||||
import json
|
||||
from pathlib import Path
|
||||
data = json.loads(Path('/tmp/collections.json').read_text())
|
||||
versions = {
|
||||
name: metadata['version']
|
||||
for collections in data.values()
|
||||
for name, metadata in collections.items()
|
||||
if name.startswith('community.')
|
||||
}
|
||||
assert 'community.docker' in versions, versions
|
||||
Path('/workspace/delivery/ansible/requirements.yml').write_text(
|
||||
'collections:\n' + ''.join(
|
||||
f' - name: {name}\n version: "{version}"\n'
|
||||
for name, version in sorted(versions.items())
|
||||
)
|
||||
)
|
||||
print(f'Pinned collections: {versions}')
|
||||
PY
|
||||
Reference in New Issue
Block a user