def show_template(host, path, gather_facts=True,
                  inventory_file=None, password_file=None):
    inventory = get_inventory(inventory_file, password_file)
    setup_cache = get_gathered_facts(host, inventory) if gather_facts else {}

    # Show the template
    runner = Runner(
        inventory=inventory,
        setup_cache=setup_cache,
    )
    host_vars = runner.get_inject_vars(host)
    print template_from_file('.', path, host_vars)
Exemple #2
0
def show_template(host, path, gather_facts=True,
                  inventory_file=None, password_file=None,
                  user=None):
    inventory = get_inventory(inventory_file, password_file)
    setup_cache = get_gathered_facts(
            host, inventory, user) if gather_facts else {}
    # Show the template
    runner = Runner(
        inventory=inventory,
        setup_cache=setup_cache,
    )
    host_vars = runner.get_inject_vars(host)
    print template_from_file('.', path, host_vars)
Exemple #3
0
def show_vars(host, inventory_file=None, password_file=None):
    inventory = get_inventory(inventory_file, password_file)
    Runner.get_inject_vars = get_inject_vars
    runner = Runner(inventory=inventory)
    runner.get_inject_vars(host)
Exemple #4
0
def show_vars(host, inventory_file=None, password_file=None):
    inventory = get_inventory(inventory_file, password_file)
    Runner.get_inject_vars = get_inject_vars
    runner = Runner(inventory=inventory)
    runner.get_inject_vars(host)