Nectere AtlasAnsible stationWork in progress

Atlas Ansible Station

The Ansible station runs playbooks in Atlas. Import a repository as a zip or from git, or write a single playbook in the browser, and launch it against an Atlas inventory. Variable sets, vault passwords and Galaxy collections live here too.

Still being builtUsable for real jobs but still changing. Where this guide and the app disagree, the app is right.

← Back to the Nectere Atlas guide

01What's in the station

The station adds Projects, Playbooks, Variables and Collections to the sidebar, plus the Project Playbook and Saved Playbook tabs in Command Station. Core items in the mock link back to the main guide.

Not securehttps://array.corp.lab/i/3f9a1c07/Projects
PieceUse it for
ProjectA full Ansible tree: playbooks, roles, group_vars, templates, requirements.yml, ansible.cfg
Saved playbookOne self-contained playbook written in the browser
Variable setNamed bundle of extra vars for any launch
Vault credentialPassword for ansible-vault encrypted files
CollectionGalaxy collection available to every project and playbook on the tile

Hosts always come from an Atlas inventory. Inventory files in a project are ignored.

02Projects

Click a row to open it. Launch opens Command Station with the project selected; Sync pulls from git.

https://array.corp.lab/i/3f9a1c07/Projects
BadgeMeans
5 playbooksFiles offered in the Playbook list at launch
3 rolesFolders under roles/
group_vars ansible.cfgPresent and used
requirements.ymlNeeds collections or roles. Open the project and press Install requirements.
vaultHas vault-encrypted files. Pick a vault credential at launch.

New Project

+ New Project has three sources.

Source
New Project
  • Upload zip unpacks the archive, dropping a single wrapper folder if there is one (macOS and GitHub downloads have one). 50 MB limit.
  • Clone from git takes an https address, optional branch and optional access token for private repos. Saving starts the clone as a run and opens its log.
  • Empty creates a blank project for the file editor.

What goes in the zip

In the app, the ? next to the Projects title or the What goes in the zip? link opens this.

Building a project zip

Files and editor

Playbooks carry a ▶ playbook marker and get a Launch this playbook button in the editor. Save with the button or ctrl/cmd+S; ● unsaved marks pending changes.

Open
https://array.corp.lab/i/3f9a1c07/Project
ButtonDoes
LaunchOpens Command Station with this project selected
Sync (git pull)Git projects only. Pulls new commits as a run.
Install requirementsShown when requirements.yml exists. Installs it as a run.
Upload zipReplaces every file after confirming Replace every file in this project with the contents of the zip?
ExportDownloads the project as a zip
EditName and description; for git projects also address, branch and token
DeleteConfirms with Delete project "nfs-lab" and all its files?
+ file / + dirCreate a path relative to the project root

Binary files and files over 2 MB won't open. Leaving a file with unsaved changes asks Discard unsaved changes?

Git projects

Created from a shallow clone of the named branch. Sync pulls new commits but won't overwrite conflicting local edits, so editor changes can make a sync fail. A stored token shows as (token stored, leave blank to keep) when editing. Zip projects refresh with Upload zip instead.

03Saved playbooks

For short jobs like patch-and-reboot. Anything with roles, templates or extra files belongs in a project.

https://array.corp.lab/i/3f9a1c07/Playbooks
Edit Playbook
  • New playbooks start from a template that pings every host, so they launch as-is.
  • Names are fixed once saved. To rename, copy under the new name and delete the old one.
  • Launch opens Command Station on the Saved Playbook tab with that playbook selected.

04Variable sets

Extra vars you'd otherwise retype each launch: proxy settings, a feature flag, a release version. Lists and nested data need YAML.

https://array.corp.lab/i/3f9a1c07/Variables
Format
Variable Set

Switching to YAML carries key/value pairs across. Key/value values are always strings.

MessageWhen
Variable table 'proxy' createdSaved a new set
Add at least one variable with a keyKey/value form is empty
YAML is emptyYAML form is empty
A table named 'proxy' already existsNames must be unique

Later sources win. Sets apply in the order picked and the launch form's Extra vars applies last.

05Vault credentials

Vault passwords are stored on Credentials as type Ansible Vault password. They show a violet avatar and ansible-vault in the list, and never appear where a login is expected.

New Credential

Pick one or more under Vault credentials at launch. Projects with several vault IDs need each matching credential.

MessageWhen
Vault password is requiredNew vault credential with no password
Credential 'nfs-vault' createdSaved

06Collections

Shared by every project and saved playbook on the tile. Enter a name like community.general, or pin a version with community.general:==8.0.0, and press Install.

State
https://array.corp.lab/i/3f9a1c07/Collections

Search Galaxy

Search Ansible Galaxy

Search Galaxy finds collections by name or keyword. Install on a result closes the search and starts the install.

MessageWhen
Collection installedThe install finished
Expected namespace.name (e.g. community.general)The name is missing its dot
Removed community.dockerRemove confirmed
No collections installed, or Ansible is not available.The list is empty

Installs also land in Runs as kind galaxy.

07Launching a playbook

Project Playbook takes a project and one of its playbooks, preselected when there's an entry playbook or only one. Saved Playbook takes a saved playbook. Ping Test, Gather Facts and output work as in the core Command Station.

Tab
Output
Options
https://array.corp.lab/i/3f9a1c07/Command Station

Options

OptionDoes
ModeRun, Dry run (--check) to preview changes, Syntax check, List tasks or List hosts. The last three don't touch hosts.
show diffBefore and after of each changed file. Useful with a dry run.
target all inventory hostsOn by default. See below.
Variable setsAny number, applied in the order picked
Vault credentialsVault passwords the project needs
Extra varsYAML or JSON, applied last
Tags / Skip tagsComma-separated, e.g. setup,deploy
LimitHost pattern that narrows the run, e.g. web01
Extra CLI argsAny other ansible-playbook flags, e.g. --step --start-at-task 'Base packages'. Quoting works as in a shell.

Play targets and groups

A play with hosts: app_servers only runs if the inventory has an app_servers group, and borrowed projects often name groups yours lacks. With target all inventory hosts ticked, each missing group is filled with every host in the inventory. The log's first line says so:

atlas: play targets 'app_servers' are not groups in inventory 'web-tier', pointing them at all 2 of its hosts

Existing groups are untouched, as are all, localhost, wildcards and exclusions. Untick it when plays for different groups (web, db) should each hit only their own hosts.

08Reading a playbook run

Project runs get a Project button that opens the project's files.

View
https://array.corp.lab/i/3f9a1c07/Runs

Colours in the log

ColourLines
orange, boldPLAY [...] and PLAY RECAP
blue, boldTASK [...] and RUNNING HANDLER [...]
greenok: [host], and recap host names with nothing changed or failed
amberchanged: [host], and recap names with changes
rosefatal:, failed:, ERROR!, and recap names with failures or unreachable hosts
blueskipping: [host]
violet[WARNING], [DEPRECATION WARNING]

Run kinds from the station

KindLabel looks likeRe-run
playbooknfs-lab / site.yml for a project, playbook: patch-reboot for a saved oneYes, same options
galaxyinstall community.general or requirements: nfs-labNo. Install again from Collections or the project.
syncsync web-stackNo. Press Sync on the project.

Re-run uses the project's current files, so edits made since the first run are picked up.

09Things to know

  • Hosts come from Atlas, always. Group variables go in the project's group_vars/ or on the Atlas inventory's groups.
  • The project's ansible.cfg applies. roles_path, interpreter_python, become defaults and the rest are honoured. Any inventory line is not.
  • Collections are shared. Installs and removals affect every project and saved playbook on the tile.
  • Start with a dry run. Use Dry run (--check) with show diff the first time a playbook meets a set of hosts.
  • Watch the first log line. atlas: play targets means a play is about to hit more hosts than its author intended.
  • Secrets belong in vault or variable sets. Plain-text passwords in a project end up in exports and backups.
  • Saved playbooks run on their own. No access to project files, templates or roles.