From: Balint Varga Date: Wed, 12 Jun 2019 11:33:29 +0000 (+0200) Subject: Change cmcli usage X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcaas-lcm.git;a=commitdiff_plain;h=1c68cb9d7d034474ebf041ef5fa52e17872854d0 Change cmcli usage Now it's able be able to run on different environments Signed-off-by: Balint Varga Change-Id: I3f4470be8b271fff4dd7d9edb9e3a9980b27fe98 --- diff --git a/ansible/playbooks/pre_config_lcm.yaml b/ansible/playbooks/pre_config_lcm.yaml index 2b5ef2c..a1db194 100644 --- a/ansible/playbooks/pre_config_lcm.yaml +++ b/ansible/playbooks/pre_config_lcm.yaml @@ -17,6 +17,6 @@ - hosts: caas_master strategy: free become: true - become_user: "{{ users.admin_user_name }}" + become_user: "root" roles: - pre_config_lcm diff --git a/ansible/roles/pre_config_lcm/tasks/main.yml b/ansible/roles/pre_config_lcm/tasks/main.yml index e5583c3..612364e 100644 --- a/ansible/roles/pre_config_lcm/tasks/main.yml +++ b/ansible/roles/pre_config_lcm/tasks/main.yml @@ -18,10 +18,9 @@ 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") diff --git a/rpmbuild.spec b/rpmbuild.spec index 6da68a8..c58da15 100644 --- a/rpmbuild.spec +++ b/rpmbuild.spec @@ -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