cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted
DemisT
Iron

GAiA API failing to install with Ansible

Jump to solution

Hi all,

 

I have the following task in my ansible playbook for installing the GAiA API (version 1.3) on my gateways and SMS:

- name: Install gaia_api
  shell: ./install_gaia_api.sh
  args:
    chdir: /home/admin/gaia_api
  register: output

- name: Output
  debug:
    var: output.stdout_lines
 
When I'm running the playbook on my gateways (reimaged with blink_image_1.1_Check_Point_R80.30_Gateway.tgz) and SMS (reimaged with blink_image_1.1_Check_Point_R80.30_Management.tgz), I'm getting the following output after performing a 'gaia_api status' on the gateways, but on the SMS everything seems to be working fine:
 
[Expert@GW1:0]# gaia_api status
Traceback (most recent call last):
File "/rest_api/ckp/client_util/serverStatusPrinter.py", line 2, in <module>
from objects.serverStatus import *
File "/rest_api/ckp/objects/serverStatus.py", line 1, in <module>
from infra.annotations import *
File "/rest_api/ckp/infra/annotations.py", line 3, in <module>
import rest_rba
File "/rest_api/libs/rest_rba.py", line 7, in <module>
import sessions_manager
File "/rest_api/libs/sessions_manager.py", line 12, in <module>
import rest_api_xml_parser
File "/rest_api/libs/rest_api_xml_parser.py", line 8, in <module>
import command_factory as fact
File "/rest_api/libs/command_factory.py", line 10, in <module>
import clish
File "/rest_api/libs/clish.py", line 5, in <module>
from flaskApi import getRequestHeader
File "/rest_api/libs/flaskApi.py", line 12, in <module>
from flask import *
ImportError: No module named flask

 

I've checked the Ansible output and even though it says the installation completed successfully it's still giving me the output errors when running gaia_api status. But when I manually run the install_gaia_api.sh script it seems to be working.

ok: [GW1] => {
"output.stdout_lines": [
"Starting gaia_api installation",
"Old version removed successfully",
"Installing gaia_api...",
"Successfully installed gaia_api, use \"gaia_api status\" to monitor the state"
]
}

 

I have my Python interpreter set as: ansible_python_interpreter="/opt/CPsuite-R8*/fw1/Python/bin/python"
Remarkably, when I use ansible_python_interpreter=python, I'm getting the following error on the gateways (not on the SMS): 

fatal: [GW2]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 10.23.112.102 closed.\r\n", "module_stdout": "/bin/sh: python: command not found\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 

Which makes me think it's a Python issue.

Any suggestions? I'd appreciate some input.

0 Kudos
1 Solution

Accepted Solutions
DemisT
Iron

Re: GAiA API failing to install with Ansible

Jump to solution

It seemed like the post rpm install scripts were not executing after the task. The fix was to add pipelining=true inside the ansible.cfg file.

Tested on a clean installation of Gaia 80.10 and 80.30

View solution in original post

0 Kudos
3 Replies
Admin
Admin

Re: GAiA API failing to install with Ansible

Jump to solution

@Amiad_Stern what say you?

0 Kudos

Re: GAiA API failing to install with Ansible

Jump to solution

 @PhoneBoy , @DemisT , since it is Gaia API related, i'm adding @Itaiw (Team Leader) .

0 Kudos
DemisT
Iron

Re: GAiA API failing to install with Ansible

Jump to solution

It seemed like the post rpm install scripts were not executing after the task. The fix was to add pipelining=true inside the ansible.cfg file.

Tested on a clean installation of Gaia 80.10 and 80.30

View solution in original post

0 Kudos