Skip to main content

run_update_etc_hosts

Function run_update_etc_hosts 

Source
pub fn run_update_etc_hosts(
    ctx: &Context,
    dry_run: bool,
    remove: bool,
    ip_address: &str,
    backend: &dyn HostsBackend,
    write_fn: &WriteFn,
) -> Result<()>
Expand description

Port of updateetchosts.runUpdateEtcHosts.

ยงErrors

Returns UpdateEtcHostsError::NoHostnames if no hostnames are configured; an error if configuration loading, resolving the cluster IP, validating, computing the update/removal, or writing fails.