Ansible playbooks that install and manage Nexcess CloudHost servers with InterWorx
- A target host running Rocky Linux 9 (current) or CentOS 7 (legacy) — those are the two
distros
playbooks/os_vars/and the CI matrix cover. - Ansible on the control host, plus
gitsoansible-galaxycan fetch roles overgit+https. - If you're running
ansible-corerather than the fullansiblepackage: thecommunity.general(ini_file) andansible.posix(mount,sysctl,selinux) collections, without which a setup run fails, pluscommunity.mysqlif you're running the import playbook.Dockerfile.rocky9installs all three. - An
inventories/directory. It is deliberately not in this repo; the cloud deployment system supplies it, and./playbookexpectsinventories/<project>/<mode>/<zone>.ini. GITHUB_TOKENexported, if you want./playbookto pull thenexcess/puppet-configHiera YAML. Of the three files it fetches, onlynetwork.yamlcurrently has a consumer — thenexcess.serverrole reads its firewall and backup-agent CIDR lists.- Docker, for the test suites only.
Typically this will be used from our cloud deployment system. If you'd like to use it for testing then do the following:
- Create a VM to test on.
- Add an inventory entry for that VM under
inventories/— theplaybookscript picks the file from itsPROJECT,MODE, andZONESvariables (currentlymetaworx,prod,us-midwest-1, giving./inventories/metaworx/prod/us-midwest-1.ini). Edit those variables if you're testing against a different project, mode, or zone. - Run
./playbook setupto start the install process.MODEisprod, so host key checking stays on (ansible.cfgsets it too) — add the new VM's host key toknown_hostsfirst, or the first connection fails.
./playbook <name> runs playbooks/<name>.yml, so ./playbook ping gets you a connectivity
check before committing to a full build.
For a fully scripted local run against a Rocky 9 VM — including the SSH key, inventory, and
deployable-vars.yml you'll need — follow local-testing/README.md
instead. It's the fastest path to a working test deployment.
spec/test.sh # CentOS 7 (default): build image, lint, run playbook, serverspec
DISTRO=rocky9 spec/test.sh # Rocky 9Both are what Travis runs. They bind-mount the working tree read-write into the container, so a
run leaves roles/ and vendor/ behind (both gitignored). See TESTS.md for what the
suite covers and what it knowingly skips.
See AGENTS.md for the architecture, the annotated file map, the full command
reference, and the house conventions — including the three that bite first: roles live in other
repos and are wiped and reinstalled on every run, playbooks/ci_setup.yml is a subset of
playbooks/setup.yml rather than a mirror of it, and four of the playbooks/tasks/ files are
included twice per play.
CONTRIBUTING.md covers the PR process.
- A real InterWorx license key is required for any run that installs InterWorx. The
nexcess.interworxrole's first task hard-fails unlessiw_master_email,iw_master_password, andiw_license_keyare all non-empty, and a non-zero activation result is fatal as well. CI uses the shared key inspec/vars.yml; for a local VM run, take the test key from password management as local-testing/README.md describes.
This repo uses OpenSpec for spec-driven
development. PRs need an OpenSpec change under openspec/changes/, or an
sdd-exception: <reason> line in the PR description.