Class SaltSSHConfig.Builder

  • Enclosing class:
    SaltSSHConfig

    public static class SaltSSHConfig.Builder
    extends Object
    Builder class to create configurations for Salt SSH.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • extraFilerefs

        public SaltSSHConfig.Builder extraFilerefs​(String extraFilerefs)
        Pass in extra files to include in the state tarball.
        Parameters:
        extraFilerefs - the value to set
        Returns:
        this builder
      • identitiesOnly

        public SaltSSHConfig.Builder identitiesOnly​(boolean identitiesOnly)
        Use the only authentication identity files configured in the ssh_config files. See IdentitiesOnly flag in man ssh_config.
        Parameters:
        identitiesOnly - the value to set
        Returns:
        this builder
      • ignoreHostKeys

        public SaltSSHConfig.Builder ignoreHostKeys​(boolean ignoreHostKeys)
        By default ssh host keys are honored and connections will ask for approval. Use this option to disable 'StrictHostKeyChecking.'
        Parameters:
        ignoreHostKeys - the value to set
        Returns:
        this builder
      • keyDeploy

        public SaltSSHConfig.Builder keyDeploy​(boolean keyDeploy)
        Set this flag to attempt to deploy the authorized ssh key with all minions. This combined with --passwd can make initial deployment of keys very fast and easy.
        Parameters:
        keyDeploy - the value to set
        Returns:
        this builder
      • noHostKeys

        public SaltSSHConfig.Builder noHostKeys​(boolean noHostKeys)
        Removes all host key checking functionality from SSH session.
        Parameters:
        noHostKeys - the value the value to set
        Returns:
        this builder
      • passwd

        public SaltSSHConfig.Builder passwd​(String passwd)
        Set the default password to attempt to use when authenticating.
        Parameters:
        passwd - the value to set
        Returns:
        this builder
      • priv

        public SaltSSHConfig.Builder priv​(String priv)
        SSH private key file.
        Parameters:
        priv - the value to set
        Returns:
        this builder
      • randomThinDir

        public SaltSSHConfig.Builder randomThinDir​(boolean randomThinDir)
        Force the salt-thin to be deployed in a random path every time salt-ssh is called
        Parameters:
        randomThinDir - value to set
        Returns:
        this builder
      • refreshCache

        public SaltSSHConfig.Builder refreshCache​(boolean refreshCache)
        Force a refresh of the master side data cache of the target's data. This is needed if a target's grains have been changed and the auto refresh timeframe has not been reached.
        Parameters:
        refreshCache - the value to set
        Returns:
        this builder
      • remotePortForwards

        public SaltSSHConfig.Builder remotePortForwards​(String remotePortForwards)
        Setup remote port forwarding using the same syntax as with the -R parameter of ssh. A comma separated list of port forwarding definitions will be translated into multiple -R parameters.
        Parameters:
        remotePortForwards - the value to set
        Returns:
        this builder
      • roster

        public SaltSSHConfig.Builder roster​(String roster)
        Define which roster system to use, this defines if a database backend, scanner, or custom roster system is used. Default: 'flat'.
        Parameters:
        roster - the value to set
        Returns:
        this builder
      • rosterFile

        public SaltSSHConfig.Builder rosterFile​(String rosterFile)
        Define an alternative location for the default roster file location. The default roster file is called roster and is found in the same directory as the master config file.
        Parameters:
        rosterFile - the value to set
        Returns:
        this builder
      • scanPorts

        public SaltSSHConfig.Builder scanPorts​(String scanPorts)
        Comma-separated list of ports to scan in the scan roster.
        Parameters:
        scanPorts - the value to set
        Returns:
        this builder
      • scanTimeout

        public SaltSSHConfig.Builder scanTimeout​(Double scanTimeout)
        Scanning socket timeout for the scan roster.
        Parameters:
        scanTimeout - the value to set
        Returns:
        this builder
      • sudo

        public SaltSSHConfig.Builder sudo​(boolean sudo)
        Run command via sudo.
        Parameters:
        sudo - the value to set
        Returns:
        this builder
      • sshMaxProcs

        public SaltSSHConfig.Builder sshMaxProcs​(int sshMaxProcs)
        Set the number of concurrent minions to communicate with. This value defines how many processes are opened up at a time to manage connections, the more running processes the faster communication should be. Default: 25.
        Parameters:
        sshMaxProcs - the value to set
        Returns:
        this builder
      • user

        public SaltSSHConfig.Builder user​(String user)
        Set the default user to attempt to use when authenticating.
        Parameters:
        user - the value to set
        Returns:
        this builder
      • wipe

        public SaltSSHConfig.Builder wipe​(boolean wipe)
        Remove the deployment of the salt files when done executing.
        Parameters:
        wipe - the value to set
        Returns:
        this builder
      • build

        public SaltSSHConfig build()
        Build the configuration object.
        Returns:
        the config object