예제 #1
0
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)
예제 #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)
예제 #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)
예제 #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)