forked from Sunbird-Lern/sunbird-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue Sunbird-Lern#24 chore:Sunbird auth package build
- Loading branch information
Showing
3 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
- name: status service | ||
become: yes | ||
command: /etc/init.d/keycloak status | ||
register: keycloak | ||
poll: 5 | ||
async: 10 | ||
|
||
- name: stop service | ||
become: yes | ||
command: /etc/init.d/keycloak stop && Pkill keycloak | ||
when: "keycloak.stdout.find('running') != -1" | ||
poll: 5 | ||
async: 10 | ||
ignore_errors: yes | ||
|
||
- name: remove keycloak | ||
become: yes | ||
file: path="{{keycloak_home}}" state=absent | ||
|
||
- name: change build script permissions | ||
become: yes | ||
file: path=/opt owner={{wildfly_user}} group={{wildfly_group}} mode=0755 recurse=yes | ||
|
||
- name: Paste keycloak package on server | ||
copy: src="sunbird_auth_{{sunbird_auth_version}}.zip" dest="/opt/" force=no owner={{wildfly_user}} group={{wildfly_group}} | ||
|
||
- name: extarct the folder | ||
unarchive: src="/opt/sunbird_auth_{{sunbird_auth_version}}.zip" dest=/opt/ copy=no owner={{wildfly_user}} group={{wildfly_group}} | ||
|
||
- name: move the folder name | ||
command: mv sunbird_auth_{{sunbird_auth_version}} keycloak | ||
args: | ||
chdir: /opt | ||
|
||
- name: remove the sunbird_auth_{{sunbird_auth_version}} | ||
become: yes | ||
file: path=/opt/sunbird_auth_{{sunbird_auth_version}} state=absent | ||
|
||
- name: Create management user | ||
command: "{{ wildfly_dir }}/bin/add-user-keycloak.sh -r master -u {{ keycloak_management_user }} -p {{ keycloak_management_password }}" | ||
become_user: "{{ wildfly_user }}" | ||
when: keycloak_management_user is defined and | ||
keycloak_management_password is defined | ||
ignore_errors: yes | ||
|
||
- name: start service | ||
become: yes | ||
command: /etc/init.d/keycloak start | ||
poll: 5 | ||
async: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
tags: | ||
- build | ||
|
||
- include: deploy.yml | ||
tags: | ||
- deploy |