Many tweaks
This commit is contained in:
parent
5398ad123c
commit
227be6dd51
20 changed files with 1350 additions and 174 deletions
|
|
@ -9,16 +9,32 @@ def main() -> None:
|
|||
ap = argparse.ArgumentParser(prog="enroll")
|
||||
sub = ap.add_subparsers(dest="cmd", required=True)
|
||||
|
||||
h = sub.add_parser("harvest", help="Harvest service/package/config state into a bundle")
|
||||
h.add_argument("--out", required=True, help="Bundle output directory")
|
||||
h = sub.add_parser("harvest", help="Harvest service/package/config state")
|
||||
h.add_argument("--out", required=True, help="Harvest output directory")
|
||||
|
||||
r = sub.add_parser("manifest", help="Render Ansible roles from a harvested bundle")
|
||||
r.add_argument("--bundle", required=True, help="Path to the bundle directory created by the harvest command")
|
||||
r.add_argument("--out", required=True, help="Output directory for generated roles/playbook Ansible manifest")
|
||||
r = sub.add_parser("manifest", help="Render Ansible roles from a harvest")
|
||||
r.add_argument(
|
||||
"--harvest",
|
||||
required=True,
|
||||
help="Path to the directory created by the harvest command",
|
||||
)
|
||||
r.add_argument(
|
||||
"--out",
|
||||
required=True,
|
||||
help="Output directory for generated roles/playbook Ansible manifest",
|
||||
)
|
||||
|
||||
e = sub.add_parser("export", help="Harvest then manifest in one shot")
|
||||
e.add_argument("--bundle", required=True, help="Path to the directory to place the bundle in")
|
||||
e.add_argument("--out", required=True, help="Output directory for generated roles/playbook Ansible manifest")
|
||||
e = sub.add_parser(
|
||||
"enroll", help="Harvest state, then manifest Ansible code, in one shot"
|
||||
)
|
||||
e.add_argument(
|
||||
"--harvest", required=True, help="Path to the directory to place the harvest in"
|
||||
)
|
||||
e.add_argument(
|
||||
"--out",
|
||||
required=True,
|
||||
help="Output directory for generated roles/playbook Ansible manifest",
|
||||
)
|
||||
|
||||
args = ap.parse_args()
|
||||
|
||||
|
|
@ -26,7 +42,7 @@ def main() -> None:
|
|||
path = harvest(args.out)
|
||||
print(path)
|
||||
elif args.cmd == "manifest":
|
||||
manifest(args.bundle, args.out)
|
||||
elif args.cmd == "export":
|
||||
harvest(args.bundle)
|
||||
manifest(args.bundle, args.out)
|
||||
manifest(args.harvest, args.out)
|
||||
elif args.cmd == "enroll":
|
||||
harvest(args.harvest)
|
||||
manifest(args.harvest, args.out)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue