Skip to content

Commit

Permalink
feat: apply sat now accepts ansible_passthrough argument as env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSopenaBallesteros committed Jul 11, 2024
1 parent 703da10 commit 7a03992
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cli/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,12 @@ pub async fn process_cli(
)
.expect("ERROR: reading SAT file template. Exit");

let ansible_passthrough_env = settings.get::<String>("ansible_passthrough").ok();
let ansible_passthrough_cli_arg = cli_apply_sat_file
.get_one::<String>("ansible-passthrough")
.cloned();
let ansible_passthrough = ansible_passthrough_env.or(ansible_passthrough_cli_arg);

let prehook = cli_apply_sat_file.get_one::<String>("pre-hook");
let posthook = cli_apply_sat_file.get_one::<String>("post-hook");

Expand All @@ -1276,7 +1282,7 @@ pub async fn process_cli(
.get_one::<String>("ansible-verbosity")
.cloned()
.map(|ansible_verbosity| ansible_verbosity.parse::<u8>().unwrap()),
cli_apply_sat_file.get_one::<String>("ansible-passthrough"),
ansible_passthrough.as_ref(),
gitea_token,
// &tag,
*cli_apply_sat_file
Expand Down

0 comments on commit 7a03992

Please sign in to comment.