Change cmcli usage 83/983/1
authorBalint Varga <balint.varga@nokia.com>
Wed, 12 Jun 2019 11:33:29 +0000 (13:33 +0200)
committerBalint Varga <balint.varga@nokia.com>
Wed, 12 Jun 2019 11:35:25 +0000 (13:35 +0200)
Now it's able be able to run on different environments

Signed-off-by: Balint Varga <balint.varga@nokia.com>
Change-Id: I3f4470be8b271fff4dd7d9edb9e3a9980b27fe98

ansible/playbooks/pre_config_lcm.yaml
ansible/roles/pre_config_lcm/tasks/main.yml
rpmbuild.spec

index 2b5ef2c..a1db194 100644 (file)
@@ -17,6 +17,6 @@
 - hosts: caas_master
   strategy: free
   become: true
-  become_user: "{{ users.admin_user_name }}"
+  become_user: "root"
   roles:
     - pre_config_lcm
index e5583c3..612364e 100644 (file)
     content: |
       #!/bin/bash
       cat <<"EOF"
-      {{ lookup('pipe', '/usr/local/bin/cmcli --ip 127.0.0.1 ansible-inventory') }}
+      {{ lookup('pipe', 'sudo find /opt/ -type f -executable -name cmcli -exec {} --ip 127.0.0.1 ansible-inventory \;') }}
       EOF
     mode: 0500
     owner: "{{ users.admin_user_name }}"
     dest: {{ lcm_path }}/deploy/inventory
-  become_user: "root"
   when: nodename | search("caas_master1")
index 6da68a8..c58da15 100644 (file)
@@ -15,7 +15,7 @@
 %define COMPONENT lcm
 %define RPM_NAME caas-%{COMPONENT}
 %define RPM_MAJOR_VERSION 1.0.0
-%define RPM_MINOR_VERSION 2
+%define RPM_MINOR_VERSION 3
 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
 %define LCM_PATH /opt/caas_lcm
 %define DEPLOY_PATH %{LCM_PATH}/deploy