mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
ansible hosts -> groups
This commit is contained in:
parent
18fb853b48
commit
84db19605a
2 changed files with 5 additions and 4 deletions
|
@ -22,7 +22,7 @@ properties:
|
|||
type: array
|
||||
flag: {type: string}
|
||||
minItems: 1
|
||||
hosts:
|
||||
groups:
|
||||
type: array
|
||||
host: {type: string}
|
||||
minItems: 1
|
||||
|
|
|
@ -14,6 +14,7 @@ class AddRequiredCommands(Task):
|
|||
def run(cls, info):
|
||||
info.host_dependencies['ansible'] = 'ansible'
|
||||
|
||||
|
||||
class CheckPlaybookPath(Task):
|
||||
description = 'Checking whether the playbook path exist'
|
||||
phase = phases.validation
|
||||
|
@ -56,9 +57,9 @@ class RunAnsiblePlaybook(Task):
|
|||
conn = '{} ansible_connection=chroot'.format(info.root)
|
||||
content = ""
|
||||
|
||||
if 'hosts' in info.manifest.plugins['ansible']['hosts']:
|
||||
for host in info.manifest.plugins['ansible']['hosts']:
|
||||
content += '[{}]\n{}\n'.format(host, conn)
|
||||
if 'groups' in info.manifest.plugins['ansible']:
|
||||
for group in info.manifest.plugins['ansible']['groups']:
|
||||
content += '[{}]\n{}\n'.format(group, conn)
|
||||
else:
|
||||
content = conn
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue