def METHOD_NAME(tmp_path):
    private_data_dir = tmp_path
    play = [{'hosts': 'all', 'tasks': [{'debug': {'msg': random_string()}}]}]
    path = private_data_dir / 'project'
    path.mkdir()
    playbook = path / 'main.yaml'
    with open(playbook, 'w') as f:
        f.write(json.dumps(play))
    path = private_data_dir / 'inventory'
    os.makedirs(path)
    inventory = path / 'hosts'
    with open(inventory, 'w') as f:
        f.write('[all]\nlocalhost ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}"')
    cmdline('run', str(private_data_dir), '-p', str(playbook), '--inventory', str(inventory))
    assert ansible_runner.__main__.main() == 0
    with open(playbook) as f:
        assert json.loads(f.read()) == play