Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote python interpreter and OS detection regexp #97

Open
mpagot opened this issue Nov 2, 2022 · 0 comments
Open

Remote python interpreter and OS detection regexp #97

mpagot opened this issue Nov 2, 2022 · 0 comments

Comments

@mpagot
Copy link
Collaborator

mpagot commented Nov 2, 2022

Ansible needs to know what is the Python interpreter to be used on any remote node. If none is specified, it just guess and report a Warning. The user can specify the interpreter to use as an inventory parameter:

all:
  children:
    hana:
      hosts:
        vmhana01:
          ansible_python_interpreter: /usr/bin/python3 

In qe-sap-deployment, ansible_python_interpreter is calculated by terraform by calculating the SLES version using regexp on the OS image from the cloud provider catalog. These regexps does not play well with SLE12 on some cloud providers.

https://openqaworker15.qa.suse.cz/tests/61565#step/deploy/4

ERROR    OUTPUT:          Error: Error in function call
ERROR    OUTPUT:          
ERROR    OUTPUT:            on main.tf line 58, in locals:
ERROR    OUTPUT:            58:   iscsi_major_version      = var.iscsi_os_major_version != "" ? var.iscsi_os_major_version : regex("[a-zA-Z]+:[a-zA-Z]+-[a-zA-Z]+-([0-9]+)-", local.iscsi_os_image)[0]
ERROR    OUTPUT:              �����������������
ERROR    OUTPUT:              � local.iscsi_os_image is "SUSE:sles-12-sp5-byos:gen1:2022.10.15"
ERROR    OUTPUT:          
ERROR    OUTPUT:          Call to function "regex" failed: pattern did not match any part of the given
ERROR    OUTPUT:          string.

with tfvars

vnet_address_range   = "10.10.0.0/16"
subnet_address_range = "10.10.1.0/24"
provisioner = "off"
bastion_enabled = false
hana_name = "vmhana"
hana_vm_size = "Standard_E4s_v3"
hana_count = "2"
az_region = "westeurope"
deployment_name = "qesapval61565"
os_image = "SUSE:sles-12-sp5-byos:gen1:2022.10.15"     
private_key = "/root/.ssh/id_rsa"
public_key = "/root/.ssh/id_rsa.pub"

Problematic line is os_image = "SUSE:sles-12-sp5-byos:gen1:2022.10.15"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant