Metadata-Version: 2.5
Name: trytond_ansible_projects
Version: 8.0.0.1
Summary: Ansible Projects Module
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: ansible,git,projects,scm,sync,tryton
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: pyyaml
Requires-Dist: trytond-ansible-credentials<8.1,>=8.0
Requires-Dist: trytond-ansible<8.1,>=8.0
Requires-Dist: trytond-party<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Ansible Projects
================

The ``ansible_projects`` module provides project management with
git-based SCM synchronisation, scheduling, and sync logging.

Features
--------

- **Project Management**: Define Ansible projects with SCM URL,
  branch, credential, and local filesystem path.
- **Git Sync**: Automatic git clone for new projects and git
  fetch + checkout + pull for existing projects.  Captures stdout,
  stderr, and return code for each operation.
- **Credential Integration**: Uses ``ansible.credential`` for SCM
  authentication.  SSH keys are injected via ``GIT_SSH_COMMAND``
  and HTTPS tokens are embedded in the URL.
- **Sync Scheduling**: Each project has a configurable sync
  interval in minutes.  The cron job ``ansible.sync_projects``
  syncs all due projects automatically.
- **Sync Logging**: Every sync operation is recorded in
  ``ansible.project.sync.log`` with full stdout, stderr, revision,
  and error details.
- **Manual Sync**: A wizard allows manual sync of individual
  projects from the project form.
- **Error Classification**: Git errors are classified into
  categories (auth, network, merge_conflict, not_found, unknown)
  for easier diagnosis.

Configuration
-------------

After installing the module, navigate to *Ansible > Configuration*
and set the ``Projects Base Path`` — the base directory where
project repositories will be cloned.  Individual projects can
override this with an explicit ``Local Path``.

Dependencies
------------

- Tryton modules: ``ir``, ``res``, ``party``, ``ansible``,
  ``ansible_credentials``.

Models
------

- ``ansible.project`` — ``Project``: represents a source-controlled
  Ansible project with SCM URL, branch, credential, sync interval,
  and sync status fields.
- ``ansible.project.sync.log`` — ``ProjectSyncLog``: records the
  details of each sync operation including stdout, stderr,
  revision, and classified error.
