Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Allow import_playbook
Browse files Browse the repository at this point in the history
Fixes: #61
  • Loading branch information
ssbarnea committed Jun 2, 2021
1 parent aac15d4 commit 8f6e74c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/playbooks/included.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- hosts: localhost
3 changes: 3 additions & 0 deletions examples/playbooks/invalid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- name: foo
hosts: localhost # <-- not allowed with import_playbook
import_playbook: included.yml
Empty file.
3 changes: 3 additions & 0 deletions examples/playbooks/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@

- name: password
prompt: What is your password?

- name: foo
import_playbook: included.yml
1 change: 1 addition & 0 deletions src/ansibleschemas/playbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class Config:


class ImportPlaybookModel(BaseModel):
name: Optional[str]
import_playbook: str

class Config:
Expand Down

0 comments on commit 8f6e74c

Please sign in to comment.