Skip to content

Spaces in the path of roles_path causes playbooks to fail in 1.7 #8555

@samdoran

Description

@samdoran
Issue Type:

Bug Report

Ansible Version:

ansible 1.7

Environment:
ProductName:    Mac OS X
ProductVersion: 10.9.4
BuildVersion:   13E28
Summary:

Spaces in the path of roles_path causes playbooks to fail. This works fine in 1.6.10 but is broken in 1.7.

Steps To Reproduce:
  1. Create ~/Projects/Ansible Sites/playbooks/test.yml playbook

---
- hosts: test.acme.com

  roles:
    - test_ping
  1. Create ~/Projects/Ansible Sites/roles/test_ping role with one task in main.yml

---
- ping:
  1. Add a relative path to roles_path in ~/.ansible.cfg that contains a parent directory with a space in the name:
roles_path = ./roles:./librarian_roles:../roles:../librarian_roles
  1. Run ansible-playbook playbooks/test.yml from ~/Projects/Ansible Sites
cd ~/Projects/Ansible\ Sites
ansible-playbook playbooks/test.yml
Expected Results:

Playbook will find roles in the directories specified in roles_path and run successfully.

PLAY [test.acme.com] ****************************************************

GATHERING FACTS ***************************************************************
ok: [test.acme.com]

TASK: [test_ping | ping ] *****************************************************
ok: [test.acme.com]

PLAY RECAP ********************************************************************
test.acme.com        : ok=2    changed=0    unreachable=0    failed=0
Actual Results:

Playbook fails to run because it cannot find the role.

ERROR: file could not read: /Users/sdoran/Projects/Ansible Sites/playbooks/'/Users/sdoran/Projects/Ansible Sites/roles/test_ping/tasks/main.yml'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue/PR relates to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions