diff --git a/Makefile b/Makefile index 50a2b749..6b50d50c 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ endif .PHONY: up up: env gen-certs control-plane-bake partition-bake @chmod 600 files/ssh/id_rsa - docker compose up --abort-on-container-failure --remove-orphans --force-recreate control-plane partition + docker compose up --pull=always --abort-on-container-failure --remove-orphans --force-recreate control-plane partition @$(MAKE) --no-print-directory start-machines # for some reason an allocated machine will not be able to phone home # without restarting the metal-core diff --git a/ansible.cfg b/ansible.cfg index ed21acd1..37bc3056 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,7 +2,7 @@ retry_files_enabled = false force_color = true host_key_checking = false -stdout_callback = yaml +callback_result_format = yaml jinja2_native = true transport = ssh timeout = 30 diff --git a/library/patch_service_status_k8s.py b/library/patch_service_status_k8s.py deleted file mode 100644 index 33b3014a..00000000 --- a/library/patch_service_status_k8s.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env python - -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import time -import json -from kubernetes import client, config -from kubernetes.client.rest import ApiException -from pprint import pprint -from ansible.module_utils.basic import AnsibleModule - - -def run_module(): - module_args = dict( - name=dict(type='str', required=True), - namespace=dict(type='str', required=True), - kubeconfig=dict(type='raw', no_log=True, required=False), - body=dict(type='dict', required=True) - ) - - result = dict( - changed=False, - result='' - ) - - module = AnsibleModule( - argument_spec=module_args, - supports_check_mode=True - ) - - if module.check_mode: - module.exit_json(**result) - - kubeconfig = module.params.get('kubeconfig') - - if isinstance(kubeconfig, str) or kubeconfig is None: - api_client = config.new_client_from_config(config_file=kubeconfig) - elif isinstance(kubeconfig, dict): - api_client = config.new_client_from_config_dict(config_dict=kubeconfig) - else: - module.fail_json(msg="Error while reading kubeconfig parameter - a string or dict expected, but got %s instead" % type(kubeconfig), **result) - - api_instance = client.CoreV1Api(api_client) - - name = module.params.get('name') - namespace = module.params.get('namespace') - body = module.params.get('body') - - try: - api_response = api_instance.patch_namespaced_service_status(name, namespace, body) - result['changed'] = True - result['result'] = json.dumps(api_client.sanitize_for_serialization(api_response), sort_keys=True, indent=4) - except ApiException as e: - module.fail_json(msg="Exception when calling CoreV1Api->patch_namespaced_service_status: %s\n" % e, **result) - - module.exit_json(**result) - - -def main(): - run_module() - - -if __name__ == '__main__': - main()