Skip to content

Ansible playbook failing at "Deploy Database Directly" (Chap 01 / non-standard Vagrant box) #32

@jeff-tillinghast

Description

@jeff-tillinghast

Hi all-- Because I'm running on an M1 Mac, I'm trying to make a non-standard local Vagrant configuration work. I'm running Vagrant with Parallels using box bento/ubuntu-22.04-arm64 (the recommended box per Parallels). In the Vagrantfile, I've changed line 12 to point to the according box, and line 18 to change from :virtual_box to :parallels. The box builds, and the playbook initiates through 'TASK [todo : python prerequisites]', but then it loses the plot-- it skips the next three steps and finally hits failure loop with multiple failures in 'deploy database directly', all referencing 'Invalid kube-config file. No configuration found.':

Output
TASK [todo : python prerequisites] *********************************************
changed: [host01]

TASK [todo : manifests directory] **********************************************
skipping: [host01]

TASK [todo : stage manifests] **************************************************
skipping: [host01] => (item=database.yaml)
skipping: [host01] => (item=application.yaml)
skipping: [host01] => (item=service.yaml)
skipping: [host01] => (item=scaler.yaml)
skipping: [host01]

TASK [todo : deploy database using operator] ***********************************
skipping: [host01]

TASK [todo : deploy database directly] *****************************************
FAILED - RETRYING: [host01]: deploy database directly (10 retries left).
[...]

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=pvc.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "pvc.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=database-secret.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "database-secret.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=database-deploy.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "database-deploy.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=database-service.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "database-service.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}

PLAY RECAP *********************************************************************
host01 : ok=11 changed=10 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

/Output

The only other modification I made to the Vagrant was adding 'ansible.compatibility_mode = "2.0" to both of the 'config.vm.provision' blocks in response to output during my first test run. But adding/removing that condition doesn't affect the results or the output above.

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions