Merge "Allow command-line options with --gen-answer-file" into juno
This commit is contained in:
@@ -14,9 +14,9 @@ Packstack is a utility that uses uses puppet modules to install OpenStack. It ca
|
|||||||
|
|
||||||
- packstack
|
- packstack
|
||||||
- packstack [options]
|
- packstack [options]
|
||||||
- packstack --gen-answer-file=<file> [--default-password=<passwd>] / packstack --answer-file=<file>
|
- packstack --gen-answer-file=<file> [options] / packstack --answer-file=<file>
|
||||||
|
|
||||||
The third option allows the user to generate a default answer file, edit the default options and finally run Packstack a second time using this answer file. This is the easiest way to run Packstack and the one that will be documented here. Optionally, it is possible to specify a default password when generating the answer file, and this default password will be used for all accounts.
|
The third option allows the user to generate a default answer file, edit the default options and finally run Packstack a second time using this answer file. This is the easiest way to run Packstack and the one that will be documented here. Optionally, it is possible to set additional command-line options (such as a default password), and those options will be set in the answer file.
|
||||||
|
|
||||||
When <file> is created, it will contain the OPTIONS below, which can then be edited by the user.
|
When <file> is created, it will contain the OPTIONS below, which can then be edited by the user.
|
||||||
|
|
||||||
|
|||||||
@@ -801,7 +801,7 @@ def initCmdLineParser():
|
|||||||
# Init parser and all general flags
|
# Init parser and all general flags
|
||||||
usage = "usage: %prog [options] [--help]"
|
usage = "usage: %prog [options] [--help]"
|
||||||
parser = OptionParser(usage=usage, version="%prog {0} {1}".format(version.release_string(), version.version_string()))
|
parser = OptionParser(usage=usage, version="%prog {0} {1}".format(version.release_string(), version.version_string()))
|
||||||
parser.add_option("--gen-answer-file", help="Generate a template of an answer file, using this option excludes all other options")
|
parser.add_option("--gen-answer-file", help="Generate a template of an answer file.")
|
||||||
parser.add_option("--answer-file", help="Runs the configuration in non-interactive mode, extracting all information from the"
|
parser.add_option("--answer-file", help="Runs the configuration in non-interactive mode, extracting all information from the"
|
||||||
"configuration file. using this option excludes all other options")
|
"configuration file. using this option excludes all other options")
|
||||||
parser.add_option("--install-hosts", help="Install on a set of hosts in a single step. The format should be a comma separated list "
|
parser.add_option("--install-hosts", help="Install on a set of hosts in a single step. The format should be a comma separated list "
|
||||||
@@ -970,8 +970,6 @@ def main():
|
|||||||
|
|
||||||
# If --gen-answer-file was supplied, do not run main
|
# If --gen-answer-file was supplied, do not run main
|
||||||
if options.gen_answer_file:
|
if options.gen_answer_file:
|
||||||
# Make sure only --gen-answer-file was supplied
|
|
||||||
validateSingleFlag(options, "gen_answer_file")
|
|
||||||
answerfilepath = _gettmpanswerfilepath()
|
answerfilepath = _gettmpanswerfilepath()
|
||||||
if not answerfilepath:
|
if not answerfilepath:
|
||||||
_printAdditionalMessages()
|
_printAdditionalMessages()
|
||||||
|
|||||||
Reference in New Issue
Block a user