Skip to content

Commit 6eeab73

Browse files
committed
docs: update config module documentation to reflect current implementation
- Removed references to unimplemented features (SSH credentials, deployment flags, tool-specific config) - Updated module description to focus on file system paths management - Added Path Relationships section with concrete examples - Improved code example with realistic absolute paths - Changed from 'Key Configuration Areas' to 'Current Configuration Areas' for accuracy
1 parent 0f57063 commit 6eeab73

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/config/mod.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
//! Configuration management for deployment settings
22
//!
3-
//! This module provides the `Config` struct which centralizes all deployment-related
4-
//! configuration including file paths, service connections, SSH credentials,
5-
//! and runtime behavior settings.
3+
//! This module provides the `Config` struct which manages essential file system
4+
//! paths for the deployment process including template sources and build outputs.
65
//!
7-
//! ## Key Configuration Areas
6+
//! ## Current Configuration Areas
87
//!
9-
//! - SSH credentials and connection settings
108
//! - File system paths for templates and build outputs
11-
//! - Deployment behavior flags (cleanup, verbosity, etc.)
12-
//! - Tool-specific configuration (Ansible, `OpenTofu`)
9+
//! - Project root directory for resolving relative paths
10+
//!
11+
//! ## Path Relationships
12+
//!
13+
//! Typically, the paths have this relationship:
14+
//! - `project_root`: `/path/to/torrust-tracker-deploy`
15+
//! - `templates_dir`: `{project_root}/templates`
16+
//! - `build_dir`: `{project_root}/build`
1317
//!
1418
//! The configuration is typically created once at deployment start and passed
15-
//! throughout the system to ensure consistent settings across all components.
19+
//! throughout the system to ensure consistent path resolution across all components.
1620
1721
use std::path::PathBuf;
1822

@@ -51,9 +55,9 @@ impl Config {
5155
/// # use std::path::PathBuf;
5256
/// # use torrust_tracker_deploy::config::Config;
5357
/// let config = Config::new(
54-
/// PathBuf::from("templates"),
55-
/// PathBuf::from("/path/to/project"),
56-
/// PathBuf::from("/path/to/project/build"),
58+
/// PathBuf::from("/home/user/project/templates"),
59+
/// PathBuf::from("/home/user/project"),
60+
/// PathBuf::from("/home/user/project/build"),
5761
/// );
5862
/// ```
5963
#[must_use]

0 commit comments

Comments
 (0)