pseguel-redhat / acm-observability-setup

Ansible playbook to setup Observability in RHACM
1 stars 3 forks source link

Issue installing with Ansible #2

Open ch-stark opened 3 years ago

ch-stark commented 3 years ago

when installing following instruction I need:

 sudo pip install --upgrade --user openshift
 sudo pip install --upgrade --user kubernetes
sudo pip3 install requests-oauthlib

and after that I still get:

ansible-playbook acm_setup_observability.yml -e @extra_vars-example.yml [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] ***

TASK [Gathering Facts] ***** ok: [localhost]

TASK [Log in to ACM cluster] *** ok: [localhost]

TASK [Create a k8s namespace] ** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'kubernetes' fatal: [localhost]: FAILED! => {"changed": false, "error": "No module named 'kubernetes'", "msg": "Failed to import the required Python library (openshift) on cstark.muc.csb's Python /usr/libexec/platform-python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

PLAY RECAP ***** localhost : ok=2 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

[cstark@cstark acm-observability-setup]$ ansible --version
ansible 2.9.17
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/cstark/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.8 (default, Aug 18 2020, 08:33:21) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]

trying to sort this out

ch-stark commented 3 years ago

this works:

pip3 install openshift pyyaml kubernetes --user
(I tried both openshift/kubernetes before)

I'll now create a buckt

TASK [Create the new CR for MultiClusterObservability] **** task path: /home/cstark/installrhacm/acm-observability-setup/acm_setup_observability.yml:87 fatal: [localhost]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'bucket_name' is undefined\n\nThe error appears to be in '/home/cstark/installrhacm/acm-observability-setup/acm_setup_observability.yml': line 87, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Create the new CR for MultiClusterObservability\n ^ here\n" }

PLAY RECAP **** localhost : ok=9 changed=3 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

pseguel-redhat commented 3 years ago

I'll add a requirements.txt with the packages, so it can be executed via pip install -r requirements.txt

ch-stark commented 3 years ago

I can install after setting the bucket-name and

aws s3api create-bucket --bucket testcstark --region eu-central-1 --create-bucket-configuration LocationConstraint=eu-central-1