depl 2.4.3

Toolkit for a bunch of local and remote CI/CD actions
Documentation
//! Ansible options module.

use serde::{Deserialize, Serialize};
use std::collections::BTreeSet;
use std::path::PathBuf;

use crate::entities::info::ShortName;

/// Options for Ansible runs.
#[derive(Deserialize, Serialize, PartialEq, Eq, PartialOrd, Ord, Clone, Default)]
pub struct AnsibleOpts {
  /// Option to create Ansible inventory from given remote hosts.
  #[serde(default, skip_serializing_if = "BTreeSet::is_empty")]
  pub create_inventory: BTreeSet<ShortName>,

  /// Option to use some existing Ansible inventory.
  ///
  /// Note that Deployer uses only `.ini` inventories.
  #[serde(skip_serializing_if = "Option::is_none")]
  pub use_inventory: Option<PathBuf>,

  /// Use certain host group (defaults to `all`).
  #[serde(skip_serializing_if = "Option::is_none")]
  pub host_group: Option<String>,
}