Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions stackl/agent/agent/kubernetes/handlers/ansible_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
"""
import json
import os
from typing import List
from agent.kubernetes.handlers.ansible_plugins.inventory import STACKL_PLUGIN
from agent.kubernetes.handlers.ansible_plugins.callback import ANSIBLE_CALLBACK_PLUGIN

from typing import List

from agent.kubernetes.kubernetes_secret_factory import get_secret_handler

from .base_handler import Handler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
Stackl callback plugin for Ansible
"""
ANSIBLE_CALLBACK_PLUGIN = """
DOCUMENTATION = '''
author: GBrawl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

"""
Stackl inventory script for Ansible
"""
STACKL_PLUGIN = """
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
Expand Down Expand Up @@ -271,4 +273,4 @@ def parse(self, inventory, loader, path, cache):
except Exception as e:
raise AnsibleError('Error: this was original exception: %s' %
to_native(e))
"""
"""
2 changes: 0 additions & 2 deletions stackl/agent/agent/kubernetes/outputs/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def stackl_container(self):
"""
return client.V1Container(name='stackl-output',
image=self.stackl_cli_image,
env=self.env,
volume_mounts=self.volume_mounts,
image_pull_policy='Always',
command=self.stackl_cli_command,
args=[self.stackl_cli_command_args])
Expand Down
19 changes: 9 additions & 10 deletions stackl/core/core/handler/stack_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,7 @@ def update_service_definition(self, count, item, opa_service_params,
**stack_instance.service_secrets.get(svc, {})
}
service_definition.agent = agent
if "stackl_hostname" in service_definition.provisioning_parameters:
service_definition.template_hosts(
service_definition.provisioning_parameters["stackl_hostname"],
service_definition.provisioning_parameters.get(
"instances", None), count + 1)

return service_definition

def add_outputs(self, outputs_update):
Expand All @@ -375,11 +371,14 @@ def add_outputs(self, outputs_update):
**service_definition.outputs,
**outputs_update.outputs
}
service_definition.provisioning_parameters = {
**service_definition.provisioning_parameters,
**stack_instance.instance_outputs,
**service_definition.outputs
}
service_definition.provisioning_parameters = {
**service_definition.provisioning_parameters,
**stack_instance.instance_outputs,
**service_definition.outputs
}
if "stackl_hosts" in service_definition.outputs:
service_definition.hosts = service_definition.outputs[
"stackl_hosts"]

return stack_instance

Expand Down