mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00

If ansible_ssh_user is set through extra_vars, ansible will create a .ansible directory in the home dir of that user. However, it will be owned by root, which is not what ansible will be expecting when it is provision through SSH at a later date.
17 lines
563 B
Python
17 lines
563 B
Python
from . import tasks
|
|
|
|
|
|
def validate_manifest(data, validator, error):
|
|
from bootstrapvz.common.tools import rel_path
|
|
validator(data, rel_path(__file__, 'manifest-schema.yml'))
|
|
|
|
|
|
def resolve_tasks(taskset, manifest):
|
|
taskset.update([tasks.AddPackages,
|
|
tasks.AddRequiredCommands,
|
|
tasks.CheckPlaybookPath,
|
|
tasks.RunAnsiblePlaybook,
|
|
])
|
|
|
|
if manifest.plugins['ansible'].get('extra_vars', {}).get('ansible_ssh_user', False):
|
|
taskset.add(tasks.RemoveAnsibleSSHUserDir)
|