Project

General

Profile

Actions

Bug #38254

open

Inconsistent Behavior When Applying Playbooks Like Roles

Added by Nofar Alfassi about 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Currently, playbooks can be imported and assigned to hosts in the same way as roles. However, when attempting to apply them, Ansible fails silently with the following warning:


TASK [Apply roles] *************************************************************
[WARNING]: Ignoring invalid path provided to plugin path:
'/etc/ansible/roles/foo.yml' is not a directory

PLAY RECAP *********************************************************************
host.something.somewhere : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
Exit status: 0

This creates an inconsistent experience - either playbooks should be fully supported like roles, or users should not be able to import and assign them in the first place. The current behavior leaves them in an unusable state.

Steps to Reproduce:
1. Import a playbook into Foreman the same way as an Ansible role.
2. Assign the playbook to a host.
3. Attempt to apply the playbook to the host.

Actual Behavior:
  • Ansible fails silently, producing the above warning.
  • Playbooks cannot be applied, despite being assignable like roles.
Expected Behavior:
  • Either playbooks should be fully supported and applied like roles, or
    Playbooks should not be importable and assignable if they cannot be applied.
Suggested Fix:
  • Either support applying playbooks like roles, or
  • Prevent importing and assigning playbooks if they cannot be applied
Actions

Also available in: Atom PDF