diff --git a/ansible/roles/cassandra-state-validated/tasks/main.yml b/ansible/roles/cassandra-state-validated/tasks/main.yml index dd9f542ac50e7c162ed8acb9806f6ce13193dc7c..041aab4c1d4dac891a0777e2a0220d57779c96f8 100644 --- a/ansible/roles/cassandra-state-validated/tasks/main.yml +++ b/ansible/roles/cassandra-state-validated/tasks/main.yml @@ -1,36 +1,36 @@ -#- name: Copy the jar -# become: yes -# copy: -# src: "{{cassandra_jar_path}}/statevalidator-util-1.0-SNAPSHOT-jar-with-dependencies.jar" -# dest: "{{cassandra_deploy_path}}" -# run_once: true -# -#- name: Run the application -# shell: java -jar statevalidator-util-1.0-SNAPSHOT-jar-with-dependencies.jar -# run_once: true -# -#- name: cloning the sunbird-utils repo -# file: -# state: absent -# path: /tmp/sunbird-utils/ -# -#- name: cloning the sunbird-utils repo -# git: -# repo: 'https://github.com/project-sunbird/sunbird-utils.git' -# dest: /tmp/sunbird-utils -# version: "master" -# force: yes -# -#- name: Unarchive a file that is already on the remote machine -# unarchive: -# src: /tmp/sunbird-utils/sunbird-cassandra-migration/cassandra-migration-etl/common/UserSyncBin.zip -# dest: /tmp/sunbird-utils/sunbird-cassandra-migration/cassandra-migration-etl/common/ -# remote_src: yes -# -#- name: run the script to synch es data -# shell: bash UserSync_run.sh --context_param sunbird_cassandra_server="{{sunbird_cassandra_server}}" --context_param sunbird_cassandra_port="{{sunbird_cassandra_port}}" --context_param sunbird_cassandra_username="{{sunbird_cassandra_username}}" --context_param sunbird_cassandra_password="{{sunbird_cassandra_password}}" --context_param sunbird_user_sync_api_endpoint="{{sunbird_sync_api_endpoint}}" --context_param sunbird_user_sync_api_key="{{sunbird_sync_api_key}}" --context_param sunbird_user_sync_block_size="{{sunbird_sync_block_size}}" --context_param sunbird_user_sync_sleep_time="{{sunbird_sync_sleep_time}}" --context_param sunbird_cassandra_table="user" --context_param sunbird_sync_object_type="user" -# args: -# chdir: /tmp/sunbird-utils/sunbird-cassandra-migration/cassandra-migration-etl/common/UserSync/ +- name: Copy the jar + become: yes + copy: + src: "{{cassandra_jar_path}}/statevalidator-util-1.0-SNAPSHOT-jar-with-dependencies.jar" + dest: "{{cassandra_deploy_path}}" + run_once: true + +- name: Run the application + shell: java -jar statevalidator-util-1.0-SNAPSHOT-jar-with-dependencies.jar + run_once: true + +- name: cloning the sunbird-utils repo + file: + state: absent + path: /tmp/sunbird-utils/ + +- name: cloning the sunbird-utils repo + git: + repo: 'https://github.com/project-sunbird/sunbird-utils.git' + dest: /tmp/sunbird-utils + version: "master" + force: yes + +- name: Unarchive a file that is already on the remote machine + unarchive: + src: /tmp/sunbird-utils/sunbird-cassandra-migration/cassandra-migration-etl/common/UserSyncBin.zip + dest: /tmp/sunbird-utils/sunbird-cassandra-migration/cassandra-migration-etl/common/ + remote_src: yes + +- name: run the script to synch es data + shell: bash UserSync_run.sh --context_param sunbird_cassandra_server="{{sunbird_cassandra_server}}" --context_param sunbird_cassandra_port="{{sunbird_cassandra_port}}" --context_param sunbird_cassandra_username="{{sunbird_cassandra_username}}" --context_param sunbird_cassandra_password="{{sunbird_cassandra_password}}" --context_param sunbird_user_sync_api_endpoint="{{sunbird_sync_api_endpoint}}" --context_param sunbird_user_sync_api_key="{{sunbird_sync_api_key}}" --context_param sunbird_user_sync_block_size="{{sunbird_sync_block_size}}" --context_param sunbird_user_sync_sleep_time="{{sunbird_sync_sleep_time}}" --context_param sunbird_cassandra_table="user" --context_param sunbird_sync_object_type="user" + args: + chdir: /tmp/sunbird-utils/sunbird-cassandra-migration/cassandra-migration-etl/common/UserSync/ - name: Fetching the cassandra log files from server to jenkins fetch: