Projects¶
A project is a Git repository Liftway reads automation from. Syncing a project pins a commit and builds a catalogue of the playbooks and inventory files it contains. Templates and inventories then refer to the project, and every launch records the pinned commit.
Create a project¶
Projects → Add project.
| Field | Rules |
|---|---|
| Name | 1–100 characters |
| Description | Optional, up to 1,000 characters |
| Repository URL | https://host/path.git without a username, password, query or fragment, or SSH form git@host:path.git |
| Branch | A branch, tag or commit; letters, digits, _ . / -; no .. |
| Authentication | Public HTTPS, or a reusable Git credential (HTTPS token, GitLab Deploy Token or SSH key) |
| Organisation | Optional label for orientation |
Never put a token in the URL: Liftway rejects it. Use a credential instead; Git receives it through an askpass helper, so it never appears in a URL, a process list or the sync output.
SSH repositories always need a Git SSH key credential with verified known_hosts entries for the Git server.
Sync¶
Press Sync (or POST /api/projects/{id}/sync). Liftway:
- reads the credential from Vault using the controller's reader role;
- fetches the requested ref with a shallow clone;
- records the commit SHA;
- walks the tracked files (never following a symlink out of the checkout) and catalogues:
- playbooks — YAML files whose top level is a list containing a play with
hostsorimport_playbook; - inventory files — YAML mappings with a top-level
allkey or located under aninventory/orinventories/directory,.inifiles, and files namedinventoryorhosts.
- playbooks — YAML files whose top level is a list containing a play with
Limits: the catalogue stops at 500 playbooks plus inventory files, files larger than 1 MB are skipped, and each Git command times out after 120 seconds. A playbook you expect but do not see in the template's list is usually too large, untracked, or not a list of plays. Git error messages are summarised; raw stderr and credentials are never shown.
Each sync is recorded as a system job under Jobs → System, with who started it, the trigger (manual or scheduled), the resource and a summary such as Playbooks: 12 → 13 | +1 added.
Sync never runs a playbook.
When to sync again¶
- After you push changes you want the next launch to use. A launch always uses the last successfully synced commit, never the branch tip at launch time.
- After you change the URL, branch or credential. Any of these resets the project to never synced; templates using it cannot launch until the next successful sync.
- On a schedule: Administration → Schedules & retention can sync a project on a cron expression. See Schedules and retention.
- Inside a workflow: a Sync Project step syncs right before the steps that depend on it. See Workflows.
A failed sync keeps the previous error on the card and blocks new launches that need the project until a sync succeeds.
Ansible Galaxy collections¶
If your playbook project contains collections/requirements.yml at its root, every Git-backed Ansible job installs those collections into its temporary directory before running the playbook, from the same commit:
collections:
- name: community.general
version: ">=9.0.0"
- name: ansible.posix
An installation failure fails that job. The runner needs network access to Galaxy or your mirror. Role requirements (roles/requirements.yml) and Git submodules are not installed; vendor roles into the repository or bake them into the execution environment image.
Delete a project¶
A project cannot be deleted while a job template, a Git inventory or a workflow sync step refers to it. Runs that already used it keep their snapshot.
API¶
POST /api/projects
Content-Type: application/json
{
"name": "playbooks",
"url": "https://gitlab.example.com/team/playbooks.git",
"branch": "main",
"credential_id": "<git-credential-id>"
}
POST /api/projects/{id}/sync returns the system job. See API for automation.