File tree Expand file tree Collapse file tree 3 files changed +14
-16
lines changed
infrastructure/external_tools/ansible/template
wrappers/inventory/context Expand file tree Collapse file tree 3 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,7 @@ impl ConfigureFirewallStep {
8989 #[ instrument(
9090 name = "configure_firewall" ,
9191 skip_all,
92- fields(
93- step_type = "system" ,
94- component = "firewall" ,
95- method = "ansible"
96- )
92+ fields( step_type = "system" , component = "firewall" , method = "ansible" )
9793 ) ]
9894 pub fn execute ( & self ) -> Result < ( ) , CommandError > {
9995 warn ! (
Original file line number Diff line number Diff line change @@ -425,10 +425,12 @@ impl AnsibleTemplateRenderer {
425425 // Read template content
426426 let template_content = tokio:: fs:: read_to_string ( & source_path)
427427 . await
428- . map_err ( |source| ConfigurationTemplateError :: TeraTemplateReadFailed {
429- file_name : template_name. to_string ( ) ,
430- source,
431- } ) ?;
428+ . map_err (
429+ |source| ConfigurationTemplateError :: TeraTemplateReadFailed {
430+ file_name : template_name. to_string ( ) ,
431+ source,
432+ } ,
433+ ) ?;
432434
433435 // Create File object for template processing
434436 let template_file =
@@ -443,16 +445,16 @@ impl AnsibleTemplateRenderer {
443445 let mut engine = crate :: domain:: template:: TemplateEngine :: new ( ) ;
444446 let rendered_content = engine
445447 . render ( template_file. filename ( ) , template_file. content ( ) , context)
446- . map_err ( |source| ConfigurationTemplateError :: InventoryTemplateCreationFailed {
447- source,
448- } ) ?;
448+ . map_err (
449+ | source| ConfigurationTemplateError :: InventoryTemplateCreationFailed { source } ,
450+ ) ?;
449451
450452 // Write rendered content to output file
451453 let output_path = destination_dir. join ( output_name) ;
452454 crate :: domain:: template:: write_file_with_dir_creation ( & output_path, & rendered_content)
453- . map_err ( |source| ConfigurationTemplateError :: InventoryTemplateRenderFailed {
454- source,
455- } ) ?;
455+ . map_err (
456+ | source| ConfigurationTemplateError :: InventoryTemplateRenderFailed { source } ,
457+ ) ?;
456458
457459 tracing:: debug!(
458460 "Successfully rendered Tera template {} to {}" ,
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ pub struct InventoryContext {
4242 ansible_host : AnsibleHost ,
4343 ansible_ssh_private_key_file : SshPrivateKeyFile ,
4444 ansible_port : AnsiblePort ,
45- /// Alias for ansible_port used in playbook templates
45+ /// Alias for ` ansible_port` used in playbook templates
4646 #[ serde( rename = "ssh_port" ) ]
4747 ssh_port : AnsiblePort ,
4848}
You can’t perform that action at this time.
0 commit comments