厨师独奏停止多次询问服务器密码



当我运行引导命令时,它会多次询问密码

Running Chef on 123.123.123.123...
Installing Librarian cookbooks...
Uploading the kitchen...
Enter the password for root@123.123.123.123:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
root@123.123.123.123's password:
Generating solo config...
root@123.123.123.123's password:
Running Chef...
Starting Chef Client, version 11.10.4

有没有办法阻止这种情况并使用一次密码?

查看knife bootstrap -h文档:

knife bootstrap FQDN (options)
        --bootstrap-no-proxy [NO_PROXY_URL|NO_PROXY_IP]
                                     Do not proxy locations for the node being bootstrapped; this option is used internally by Opscode
        --bootstrap-proxy PROXY_URL  The proxy server for the node being bootstrapped
        --bootstrap-version VERSION  The version of Chef to install
    -N, --node-name NAME             The Chef node name for your new node
        --server-url URL             Chef Server URL
        --chef-zero-port PORT        Port to start chef-zero on
    -k, --key KEY                    API Client Key
        --[no-]color                 Use colored output, defaults to false on Windows, true otherwise
    -c, --config CONFIG              The configuration file to use
        --defaults                   Accept default values for all questions
        --disable-editing            Do not open EDITOR, just accept the data as is
    -d, --distro DISTRO              Bootstrap a distro using a template
    -e, --editor EDITOR              Set the editor to use for interactive commands
    -E, --environment ENVIRONMENT    Set the Chef environment
    -j JSON_ATTRIBS,                 A JSON string to be added to the first run of chef-client
        --json-attributes
    -F, --format FORMAT              Which format to use for output
    -A, --forward-agent              Enable SSH agent forwarding
        --hint HINT_NAME[=HINT_FILE] Specify Ohai Hint to be set on the bootstrap target.  Use multiple --hint options to specify multiple hints.
        --[no-]host-key-verify       Verify host key, enabled by default.
    -i IDENTITY_FILE,                The SSH identity file used for authentication
        --identity-file
    -z, --local-mode                 Point knife commands at local repository instead of server
    -u, --user USER                  API Client Username
        --prerelease                 Install the pre-release chef gems
        --print-after                Show the data after a destructive operation
    -r, --run-list RUN_LIST          Comma separated list of roles/recipes to apply
    -s, --secret                     The secret key to use to encrypt data bag item values
        --secret-file SECRET_FILE    A file containing the secret key to use to encrypt data bag item values
    -G, --ssh-gateway GATEWAY        The ssh gateway
    -P, --ssh-password PASSWORD      The ssh password
    -p, --ssh-port PORT              The ssh port
    -x, --ssh-user USERNAME          The ssh username
        --template-file TEMPLATE     Full path to location of template to use
        --sudo                       Execute the bootstrap via sudo
        --use-sudo-password          Execute the bootstrap via sudo with password
    -V, --verbose                    More verbose output. Use twice for max verbosity
    -v, --version                    Show chef version
    -y, --yes                        Say yes to all prompts for confirmation
    -h, --help                       Show this message

您可以看到有传递--sudo--use-sudo-password--ssh-password选项的选项。如果没有更多信息,我无法告诉您使用一个,但其中一个可以让您在引导过程中指定密码。

最新更新