├── .gitignore ├── LICENSE ├── README.md ├── environments ├── hosts_connections6_production └── hosts_was_production ├── playbooks ├── ibm-connections6.yml ├── ibm-http-server-complete.yml ├── ibm-http-server │ ├── ibm-http-server-fixes.yml │ └── ibm-http-server.yml ├── ibm-sametime-was.yml ├── ibm-was-nd-complete.yml └── ibm-was-nd │ ├── ibm-was-nd-fixes.yml │ ├── java-timezone-2018_2019 │ ├── java-timezone-2018_2019.yml │ └── templates │ │ ├── DirectorySearch.txt.j2 │ │ ├── runjtzuenv_apply_fix.sh.j2 │ │ └── runjtzuenv_discover_only.sh.j2 │ ├── java-timezone-2019_2020.yml │ ├── was-backup-dir-pre-fixes.yml │ ├── was-config-systemd.yml │ ├── was-delete-all.yml │ ├── was-dmgr-start.yml │ ├── was-dmgr-stop.yml │ ├── was-nodeagent-start.yml │ ├── was-nodeagent-stop.yml │ ├── was-profile-cleanup-logs.yml │ ├── was-profile-cleanup-temps.yml │ ├── was-profile-delete-all.yml │ ├── was-server-start.yml │ └── was-server-stop.yml └── roles ├── connections-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── download_extract_connections.yml │ ├── install_connections.yml │ ├── main.yml │ └── setup_os.yml ├── templates │ ├── LC.rsp.j2 │ └── LC.rsp_withComments.j2 └── vars │ └── main.yml ├── db2-jdbc-driver-install ├── tasks │ └── main.yml └── vars │ └── main.yml ├── ibm-http-adminctl-restart ├── tasks │ └── main.yml └── vars │ └── main.yml ├── ibm-http-adminctl-start ├── tasks │ └── main.yml └── vars │ └── main.yml ├── ibm-http-adminctl-stop ├── tasks │ └── main.yml └── vars │ └── main.yml ├── ibm-http-config-plgwct ├── tasks │ ├── check_vars.yml │ ├── config_plgwct.yml │ ├── define_vars.yml │ └── main.yml ├── templates │ └── config_plugin_wct.rsp.j2 └── vars │ └── main.yml ├── ibm-http-httpdconf ├── tasks │ └── main.yml ├── templates │ └── httpd.conf.j2 └── vars │ └── main.yml ├── ibm-http-server-fix-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_ihs_fixes.yml │ └── main.yml ├── templates │ └── ihs_plg_wct_fixes.rsp.j2 └── vars │ └── main.yml ├── ibm-http-server-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_ihs.yml │ ├── main.yml │ └── setup_os.yml ├── templates │ └── ihs_plg_wct.rsp.j2 └── vars │ └── main.yml ├── ibm-http-server-restart ├── tasks │ └── main.yml └── vars │ └── main.yml ├── ibm-http-server-start ├── tasks │ └── main.yml └── vars │ └── main.yml ├── ibm-http-server-stop ├── tasks │ └── main.yml └── vars │ └── main.yml ├── installation-manager-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_iim.yml │ ├── main.yml │ └── setup_os.yml └── vars │ └── main.yml ├── sametime-was-server-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_sametime_was.yml │ └── main.yml ├── templates │ ├── install_stconsole.rsp.j2 │ ├── install_stmedia.rsp.j2 │ └── install_stproxy.rsp.j2 └── vars │ └── main.yml ├── was-backup-dir-pre-fixes-zip ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-backup-dir-pre-fixes ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-config-systemd ├── tasks │ └── main.yml ├── templates │ ├── dmgr.service.j2 │ └── nodeagent.service.j2 └── vars │ └── main.yml ├── was-dmgr-config-jvm ├── tasks │ └── main.yml ├── templates │ └── was_config_dmgr_jvm.py.j2 └── vars │ └── main.yml ├── was-dmgr-config-ldap ├── tasks │ └── main.yml ├── templates │ └── was_config_ldap.py.j2 └── vars │ └── main.yml ├── was-dmgr-config-webserver ├── tasks │ ├── check_vars.yml │ └── main.yml └── vars │ └── main.yml ├── was-dmgr-create-profile ├── tasks │ ├── create_profile.yml │ └── main.yml ├── templates │ └── was_profile_dmgr.rsp.j2 └── vars │ └── main.yml ├── was-dmgr-enable-app-sec ├── tasks │ ├── enable_app_sec.yml │ └── main.yml ├── templates │ └── was_config_dmgr_app_sec.py.j2 └── vars │ └── main.yml ├── was-dmgr-full-sync-nodes ├── tasks │ └── main.yml ├── templates │ └── full_sync_nodes.py.j2 └── vars │ └── main.yml ├── was-dmgr-import-tls-cert ├── tasks │ └── main.yml ├── templates │ └── was_import_tls_cert.py.j2 └── vars │ └── main.yml ├── was-dmgr-restart ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-dmgr-start-cluster ├── tasks │ └── main.yml ├── templates │ └── start_cluster.py.j2 └── vars │ └── main.yml ├── was-dmgr-start ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-dmgr-stop-cluster ├── tasks │ └── main.yml ├── templates │ └── stop_cluster.py.j2 └── vars │ └── main.yml ├── was-dmgr-stop ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-java-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_java.yml │ └── main.yml ├── templates │ └── was_java.rsp.j2 └── vars │ └── main.yml ├── was-killall-java └── tasks │ └── main.yml ├── was-nd-fix-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_was_fixes.yml │ └── main.yml ├── templates │ └── was_nd_fixes.rsp.j2 └── vars │ └── main.yml ├── was-nd-install ├── tasks │ ├── check_vars.yml │ ├── define_vars.yml │ ├── install_was.yml │ └── main.yml ├── templates │ └── was_nd.rsp.j2 └── vars │ └── main.yml ├── was-nodeagent-start ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-nodeagent-stop ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-profile-cleanup-logs ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-profile-cleanup-temps ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-profile-create ├── tasks │ └── main.yml ├── templates │ ├── was_profile_node_managed.rsp.j2 │ └── was_profile_node_unmanaged.rsp.j2 └── vars │ └── main.yml ├── was-profile-delete-all ├── tasks │ └── main.yml └── vars │ └── main.yml ├── was-server-start ├── tasks │ └── main.yml └── vars │ └── main.yml └── was-server-stop ├── tasks └── main.yml └── vars └── main.yml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.retry 3 | *.rsp 4 | *.log 5 | environments/hosts.* 6 | templates/* 7 | playbooks/ibm-was-nd/IMPLEMENTAR* 8 | playbooks/templates 9 | playbooks/templates/* 10 | playbooks/testes.* 11 | playbooks/ibm-sametime-was.yml 12 | roles/sametime-was-server-install 13 | roles/connections-cr-update 14 | roles/docs-conversion-install 15 | was-dmgr-config-sso 16 | environments/BB 17 | playbooks/dev 18 | playbooks/BB 19 | playbooks/BB/* 20 | playbooks/ibm-was-nd/*BB* 21 | roles/BB 22 | roles/BB/* 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ansible-ibm-websphere 2 | Ansible playbooks for IBM WebSphere Application Server, Connections 6 and others 3 | 4 | # Playbooks 5 | 6 | | Playbook name | Status | Description | 7 | |-------------------------------|----------------|--------------------------------------------------------------| 8 | | ibm-was-nd-complete.yml | Complete | Install IBM HTTP Server - 8.5.5.15 | 9 | | ibm-http-server-complete.yml | Complete | Install IBM WebSphere Application Server - Network Deployment - 8.5.5.15 | 10 | | ibm-connections6.yml | Complete | Install IBM Connections 6.0 CR5 | 11 | 12 | # Roles 13 | 14 | | Role name | Description of Role | 15 | |---------------------------------|-------------------------------------------------------------------------| 16 | | connections-install | Install IBM Connections | 17 | | db2-jdbc-driver-install | Deploy db2 jdbc driver | 18 | | ibm-http-adminctl-restart | Restart IHS Admin Servers | 19 | | ibm-http-adminctl-start | Start IHS Admin Servers | 20 | | ibm-http-adminctl-stop | Stop IHS Admin Servers | 21 | | ibm-http-config-plgwct | Configure HTTP Plugin | 22 | | ibm-http-httpdconf | Configure httpd.conf | 23 | | ibm-http-server-fix-install | Install IBM HTTP Server Fixes | 24 | | ibm-http-server-install | Install IBM HTTP Server | 25 | | ibm-http-server-restart | Restart IBM HTTP Server Servers | 26 | | ibm-http-server-start | Start IBM HTTP Server Servers | 27 | | ibm-http-server-stop | Stop IBM HTTP Server Servers | 28 | | installation-manager-install | Install IBM Installation Manager | 29 | | sametime-server-install | DRAFT: Install Sametime WAS Servers | 30 | | was-backup-dir-pre-fixes | Backup WAS directories before apply a fix| 31 | | was-dmgr-config-jvm | Tune Java Virtual Machine of DMGR | 32 | | was-dmgr-config-ldap | Configure LDAP Repository (Server must be started) | 33 | | was-dmgr-config-webserver | Configure WebServers on DMGR | 34 | | was-dmgr-create-profile | Create a profile for Deployment Manager | 35 | | was-dmgr-enable-app-sec | Enable application security | 36 | | was-dmgr-full-sync-nodes | Do a Full Synchronize with nodes | 37 | | was-dmgr-import-tls-cert | Add TLS Signer Certificate to Cell Default Trust Store (Server must be started)| 38 | | was-dmgr-restart | Restart Deployment Manager | 39 | | was-dmgr-start | Start Deployment Manager | 40 | | was-dmgr-stop | Stop Deployment Manager | 41 | | was-java-install | Install IBM Java for WAS | 42 | | was-nd-fix-install | Install IBM WAS ND Fixes | 43 | | was-nd-install | Install IBM WebSphere Application Server - Network Deployment - 8.5.5 | 44 | | was-nodeagent-start | Start Node Agent | 45 | | was-nodeagent-stop | Stop Node Agent | 46 | | was-profile-cleanup-logs | Delete and truncate log files for Application Servers| 47 | | was-profile-cleanup-temps | Delete temp files on WAS Profile (server must be stopped) | 48 | | was-profile-create | Create a profile for WAS Servers | 49 | | was-profile-delete-all | Delete all profiles on WAS Servers | 50 | | was-server-start | Start Applications Servers | 51 | | was-server-stop | Stop Applications Servers | 52 | 53 | 54 | 55 | # Getting start 56 | 57 | ## Prerequisites 58 | 59 | 1) Download installation files: 60 | 61 | * IBM Installation Manager 1.8.9.1 (agent.installer.linux.gtk.x86_64_1.8.9001.20180709_1302.zip) 62 | * IBM WebSphere Application Server 8.5.5 63 | * IBM WebSphere Application Server 8.5.5 Fix Pack 15 64 | 65 | 2) Copy files to Web Server 66 | 67 | Example of my repository 68 | ``` 69 | -- installation 70 | |-- agent.installer.linux.gtk.x86_64_1.8.9001.20180709_1302.zip 71 | -- was 72 | |-- 8.5.5 73 | | |-- WAS_ND_V8.5.5_1_OF_3.zip 74 | | |-- WAS_ND_V8.5.5_2_OF_3.zip 75 | | |-- WAS_ND_V8.5.5_3_OF_3.zip 76 | | |-- WAS_V8.5.5_SUPPL_1_OF_3.zip 77 | | |-- WAS_V8.5.5_SUPPL_2_OF_3.zip 78 | | |-- WAS_V8.5.5_SUPPL_3_OF_3.zip 79 | | |-- FP15 80 | | | |-- 8.5.5-WS-WAS-FP014-part1.zip 81 | | | |-- 8.5.5-WS-WAS-FP014-part2.zip 82 | | | |-- 8.5.5-WS-WAS-FP014-part3.zip 83 | | | |-- 8.5.5-WS-WASSupplements-FP014-part1.zip 84 | | | |-- 8.5.5-WS-WASSupplements-FP014-part2.zip 85 | | | `-- 8.5.5-WS-WASSupplements-FP014-part3.zip 86 | -- connections 87 | |-- 6.0 88 | | |-- 5.2.1-P8CPE-CLIENT-LINUX.BIN 89 | | |-- 5.2.1-P8CPE-LINUX.BIN 90 | | |-- 5.2.1.7-P8CPE-CLIENT-LINUX-FP007.BIN 91 | | |-- 5.2.1.7-P8CPE-LINUX-FP007.BIN 92 | | |-- 6.0.0.0-IC-Multi-CR4-LO94111.zip 93 | | |-- CNCTNS_V6.0_IFR1WLNX,_AIX_ML.tar 94 | | |-- CNCTNS_V6.0_IFR1_LNX_ML.tar 95 | | |-- CR5 96 | | | |-- 6.0.0.0-IC-Multi-CR5-LO94188.zip 97 | | | |-- IC60_CR5_LO94194.jar 98 | | | `-- TinyEditorsForIC6_4.0.0.29.zip 99 | | |-- IBM_CONTENT_NAVIGATOR-2.0.3-LINUX.bin 100 | | |-- IBM_CONTENT_NAVIGATOR-2.0.3.8-FP008-LINUX.bin 101 | | |-- IC-ComponentPack-6.0.0.7.zip 102 | | `-- IC-CustomizerLite-1.0.zip 103 | ``` 104 | ## Configure Ansible hosts file 105 | 106 | Change you ansible host file like **hosts.example** 107 | 108 | 109 | ## Cloning ansible-ibm-websphere from git 110 | 111 | ``` 112 | cd /etc/ansible 113 | 114 | git clone https://github.com/ebasso/ansible-ibm-websphere.git 115 | ``` 116 | 117 | ## Running playbooks 118 | 119 | ``` 120 | cd /etc/ansible 121 | 122 | ansible-playbooks -i environments/hosts.development -u -k playbooks/ibm-was-nd-complete.yml 123 | 124 | ``` 125 | 126 | ## Running specific Playbooks 127 | 128 | ``` 129 | cd /etc/ansible 130 | 131 | ansible-playbooks -i environments/hosts.development -u -k playbooks/ibm-was-nd/ibm-installation-manager.yml 132 | 133 | ansible-playbooks -i environments/hosts.development -u -k playbooks/ibm-was-nd/ibm-was-nd.yml 134 | 135 | ``` 136 | 137 | 138 | # For other versions of IIM, WAS and WAS fixes 139 | 140 | 1) If you are using a different Fix Pack than FP 15, you must change generate sha256 hashes. 141 | 142 | ``` 143 | Example: sha256sum 8.5.5-WS-WAS-FP09-part1.zip 144 | ``` 145 | and set variables: 146 | 147 | 4) Change you ansible host file like 148 | 149 | ``` 150 | [was_servers] 151 | was1.company.com 152 | 153 | [was_servers:vars] 154 | ... 155 | was_version="8.5.5009.20160225_0435" 156 | ``` 157 | 158 | # Authors 159 | 160 | * **Enio Basso** - *Initial work* - [My Repository](https://github.com/ebasso) 161 | 162 | 163 | See also the list of [contributors](https://github.com/ebasso/ansible-ibm-websphere/graphs/contributors) who participated in this project. 164 | 165 | # License 166 | 167 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details 168 | -------------------------------------------------------------------------------- /environments/hosts_connections6_production: -------------------------------------------------------------------------------- 1 | # How to run 2 | # 3 | # 4 | # ansible-playbook -i environments/hosts_connections6_production -u -k playbooks/ibm-connections6.yml 5 | [dmgr] 6 | srv000.company.com 7 | 8 | [was_servers] 9 | srv001.company.com 10 | srv002.company.com 11 | srv003.company.com 12 | srv004.company.com 13 | 14 | [ihs_servers] 15 | srv010.company.com 16 | srv011.company.com 17 | 18 | [connections6-pink] 19 | srv005.company.com 20 | srv006.company.com 21 | srv007.company.com 22 | 23 | [forms-servers] 24 | srv003.company.com 25 | 26 | [docs-conversion-servers] 27 | srv004.company.com 28 | 29 | [docs-viewer-servers] 30 | srv004.company.com 31 | 32 | [all:vars] 33 | iim_repository_url=http://192.168.1.150/installation 34 | was_repository_url=http://192.168.1.150/was/8.5.5 35 | was_fixes_repository_url=http://192.168.1.150/was/8.5.5/FP15 36 | ihs_repository_url=http://192.168.1.150/was/8.5.5 37 | ihs_fixes_repository_url=http://192.168.1.150/was/8.5.5/FP15 38 | jdbc_repository_url=http://192.168.1.150/db2/jdbc/V11.1/ 39 | cnx_repository_url=http://192.168.1.150/connections/6.0 40 | cnx_fixes_repository_url=https://192.168.1.150/connections/6.0/CR5 41 | cnx_fixes_version=CR5 42 | # 43 | was_username=wsadmin 44 | was_password= 45 | # 46 | dmgr_hostname=srv000.company.com 47 | ihs_password= 48 | cnx_domainname=.company.com 49 | cnx_fqdn=connections.company.com 50 | smtp_hostname=smtp.company.com 51 | # 52 | # 53 | cnx_deploy_type=large 54 | cnx_node_list=['srv001','srv002'] 55 | cnx_hostname_list=['srv001.company.com','srv002.company.com'] 56 | #activities_app={ 'cluster_name': 'clActivities', 'nodes':['srv001','srv002']} 57 | #blogs_app={} 58 | #dogear_app={} 59 | #communities_app={} 60 | #files_app={} 61 | #forums_app={} 62 | #homepage_app={} 63 | #metrics_app={} 64 | #mobile_app={} 65 | #moderation_app={} 66 | #news_app={} 67 | #profiles_app={} 68 | #search_app={} 69 | #wikis_app={} 70 | #rte_app={} 71 | #common_app={} 72 | #widgets_app={} 73 | #push_app={} 74 | # 75 | db_username=LCUSER 76 | db_password= 77 | db_hostname=dbsrv.company.com 78 | db_port=50000 79 | db_jdbc_file=/opt/IBM/db2/V11.1/java 80 | db_type=DB2 81 | # 82 | #activities_db={ 'name': 'OPNACT', server: 'dbsrv.company.com', 'port': '50000', 'jdbc_file': '/opt/IBM/db2/V11.1/java', 'type': 'DB2', 'user': 'LCUSER', 'pw': 'password' } 83 | activities_db={ 'server': 'db2srv1-opnact.company.com' } 84 | blogs_db={ 'server': 'db2srv1-blogs.company.com' } 85 | dogear_db={ 'server': 'db2srv1-dogear.company.com' } 86 | communities_db={ 'server': 'db2srv1-sncomm.company.com' } 87 | files_db={ 'server': 'db2srv1-files.company.com' } 88 | forums_db={ 'server': 'db2srv1-forums.company.com' } 89 | homepage_db={ 'server': 'db2srv1-homepage.company.com' } 90 | metrics_db={ 'server': 'db2srv1-metrics.company.com' } 91 | mobile_db={ 'server': 'db2srv1-mobile.company.com' } 92 | profiles_db={ 'server': 'db2srv1-peopledb.company.com' } 93 | push_db={ 'server': 'db2srv1-people.company.com' } 94 | wikis_db={ 'server': 'db2srv1-wikis.company.com' } 95 | icec_db={ 'server': 'db2srv1-xcc.company.com' } 96 | # 97 | #ccm_install=true 98 | #ccm_app={ 'name':'ccm', 'cluster_name': 'clCcm', 'nodes': ['dxl1scb00151','dxl1scb00152'] } 99 | #ccm_fgncd_db={} 100 | #ccm_fnos_db={} 101 | 102 | [dmgr:vars] 103 | ldap_server=ldapserver.company.com 104 | ldap_alias=ldapserver 105 | ldap_repo=LDAP_PRODUCTION 106 | ldap_bind_user=uid=ldapusr,ou=users,o=company 107 | ldap_bind_pass= 108 | ldap_realm=ou=users,o=company 109 | 110 | [ihs_servers:vars] 111 | ihs_username=ihsadmin 112 | ihs_password= 113 | -------------------------------------------------------------------------------- /environments/hosts_was_production: -------------------------------------------------------------------------------- 1 | # How to run 2 | # 3 | # 4 | # ansible-playbook -i environments/hosts_connections6_production -u -k playbooks/ibm-was-nd-complete.yml 5 | [dmgr] 6 | srv000.company.com 7 | 8 | [was_servers] 9 | srv001.company.com servers="['server1']" 10 | srv002.company.com servers="['server2']" 11 | srv003.company.com servers="['server3']" 12 | srv004.company.com servers="['server4']" 13 | 14 | [ihs_servers] 15 | srv010.company.com 16 | srv011.company.com 17 | 18 | [all:vars] 19 | iim_repository_url=http://192.168.1.150/installation 20 | was_repository_url=http://192.168.1.150/was/8.5.5 21 | was_fixes_repository_url=http://192.168.1.150/was/8.5.5 22 | ihs_repository_url=http://192.168.1.150/was/8.5.5 23 | ihs_fixes_repository_url=http://192.168.1.150/was/8.5.5/FP15 24 | # 25 | was_username=wsadmin 26 | was_password= 27 | # 28 | dmgr_hostname=srv000.company.com 29 | was_domain_name=.company.com 30 | domain_name=.company.com 31 | # 32 | ihs_password= 33 | 34 | [dmgr:vars] 35 | #was_version="8.5.5012.20170627_1018" 36 | #profile_name=Dmgr01 37 | ldap_server=ldapserver.company.com 38 | ldap_alias=ldapserver 39 | ldap_repo=LDAP_PRODUCTION 40 | ldap_bind_user=uid=ldapusr,ou=users,o=company 41 | ldap_bind_pass= 42 | ldap_realm=ou=users,o=company 43 | 44 | [was_servers:vars] 45 | #was_version="8.5.5012.20170627_1018" 46 | profile_name=AppSrv01 47 | 48 | [ihs_servers:vars] 49 | ihs_username=ihsadmin 50 | ihs_password= 51 | -------------------------------------------------------------------------------- /playbooks/ibm-connections6.yml: -------------------------------------------------------------------------------- 1 | # Install Connections 6 2 | --- 3 | - name: Install WAS Servers 4 | hosts: dmgr,was_servers 5 | # serial: 1 6 | become: true 7 | roles: 8 | - roles/installation-manager-install 9 | - roles/was-nd-install 10 | - roles/was-nd-fix-install 11 | #- roles/was-java-install # Java 8.5.0.17 already available with WAS 8.5.5.14 12 | - roles/db2-jdbc-driver-install 13 | 14 | - name: Install HTTP Servers 15 | hosts: ihs_servers 16 | become: true 17 | roles: 18 | - roles/installation-manager-install 19 | - roles/ibm-http-server-install 20 | - roles/ibm-http-server-fix-install 21 | - roles/ibm-http-config-plgwct 22 | - roles/ibm-http-adminctl-restart 23 | - roles/ibm-http-server-restart 24 | 25 | - name: Setup DMGR 26 | hosts: dmgr 27 | become: true 28 | roles: 29 | - roles/was-dmgr-create-profile 30 | - roles/was-dmgr-start 31 | - roles/was-dmgr-import-tls-cert 32 | - roles/was-dmgr-config-ldap 33 | - roles/was-dmgr-config-jvm 34 | - roles/was-dmgr-enable-app-sec 35 | - roles/was-dmgr-restart 36 | 37 | - name: Setup WAS Nodes 38 | hosts: was_servers 39 | serial: 1 40 | become: true 41 | roles: 42 | - roles/was-profile-create 43 | - roles/was-nodeagent-start 44 | 45 | - name: Setup HTTP Servers on DMGR 46 | hosts: dmgr 47 | become: true 48 | roles: 49 | - roles/was-dmgr-config-webserver 50 | 51 | - name: Setup Connections 52 | hosts: dmgr 53 | become: true 54 | roles: 55 | - roles/connections-install 56 | -------------------------------------------------------------------------------- /playbooks/ibm-http-server-complete.yml: -------------------------------------------------------------------------------- 1 | # Install IBM HTTP Server 2 | # 3 | # Variables used in this playbook that can be setup at hosts file. 4 | --- 5 | - name: Install IBM HTTP Server - Plugin - WCT 6 | hosts: ihs_servers 7 | become: true 8 | roles: 9 | - roles/installation-manager-install 10 | - roles/ibm-http-server-install 11 | - roles/ibm-http-server-fix-install 12 | - roles/ibm-http-config-plgwct 13 | 14 | - name: Install IBM HTTP Server - Plugin - WCT 15 | hosts: dmgr 16 | become: true 17 | roles: 18 | - roles/was-dmgr-config-webserver -------------------------------------------------------------------------------- /playbooks/ibm-http-server/ibm-http-server-fixes.yml: -------------------------------------------------------------------------------- 1 | # Install IBM HTTP Server Fixes 2 | # 3 | # Variables used in this playbook that can be setup at hosts fil 4 | --- 5 | - name: Install IBM HTTP Server Fixes 6 | hosts: ihs_servers 7 | become: true 8 | vars: 9 | __repository_url: "{{ ihs_repository_url }}" 10 | #tmp_dir: "/opt/IBM/Binaries/wassup_fixes" 11 | #iim_install_location: "/opt/IBM/InstallationManager" 12 | #ihs_install_location: "/opt/IBM/HTTPServer" 13 | #plg_install_location: "/opt/IBM/WebSphere/Plugins" 14 | #wct_install_location: "/opt/IBM/WebSphere/Toolbox" 15 | #imshared_location: "/opt/IBM/IMShared" 16 | #__this_version: "{{ ihs_version | default('8.5.5011.20161206_1434') }}" 17 | #__this_files: 18 | # - { file_name: 8.5.5-WS-WASSupplements-FP011-part1.zip, check_sum: 4a8f560c3b546321a7e67facc5c25255ecd11c6b29e3fed0a38f203dd339a771 } 19 | # - { file_name: 8.5.5-WS-WASSupplements-FP011-part2.zip, check_sum: 6fec8b763020c72693a5a98ecba37c5f7778ab9bcf44b7089a9edb3dc51cb84c } 20 | # - { file_name: 8.5.5-WS-WASSupplements-FP011-part3.zip, check_sum: fe0cbc3ad678c21bb43c588bcc80242d8556b80ca2f4c237e5cc97b271eeffc7 } 21 | #__ihs_version_fp9: "8.5.5009.20160225_0435" 22 | #__ihs_files_fp9: 23 | # - { file_name: 8.5.5-WS-WASSupplements-FP0000009-part1.zip, check_sum: 736b3e13b3f38289aee4367c62b19ffcea06cf2ae4058fdb0197a3e1ec07fb27 } 24 | # - { file_name: 8.5.5-WS-WASSupplements-FP0000009-part2.zip, check_sum: 1728f184c38306e86e2e4102f153008f3b38af5c98089324b0fa4921affa2c2e } 25 | roles: 26 | - ibm-http-server-fix-install 27 | -------------------------------------------------------------------------------- /playbooks/ibm-http-server/ibm-http-server.yml: -------------------------------------------------------------------------------- 1 | # Install IBM HTTP Server 2 | # 3 | # Variables used in this playbook that can be setup at hosts file. 4 | --- 5 | - name: Install IBM HTTP Server - Plugin - WCT 6 | hosts: ihs_servers 7 | become: true 8 | vars: 9 | __repository_url: "{{ ihs_repository_url }}" 10 | #tmp_dir: "/opt/IBM/Binaries/wassup" 11 | #iim_install_location: "/opt/IBM/InstallationManager" 12 | #ihs_install_location: "/opt/IBM/HTTPServer" 13 | #plg_install_location: "/opt/IBM/WebSphere/Plugins" 14 | #wct_install_location: "/opt/IBM/WebSphere/Toolbox" 15 | #imshared_location: "/opt/IBM/IMShared" 16 | #__this_files: 17 | # - { file_name: WAS_V8.5.5_SUPPL_1_OF_3.zip, check_sum: d63c59de4a5548e3d26e71fefb76193d41ac7585bc450c1e504287e0a6f746c9 } 18 | # - { file_name: WAS_V8.5.5_SUPPL_2_OF_3.zip, check_sum: ac00e7ab43cc528fe7f3ccd69aeb6564a2e738e7bc6e30e71fd2e0d4bd64f39e } 19 | # - { file_name: WAS_V8.5.5_SUPPL_3_OF_3.zip, check_sum: 94e3d9b70b139ad5fa0578da6857b295c5d2370c1b6ecb544c1e5757406fec90 } 20 | #__this_version: "8.5.5000.20130514_1044" 21 | roles: 22 | - ibm-http-server-install 23 | -------------------------------------------------------------------------------- /playbooks/ibm-sametime-was.yml: -------------------------------------------------------------------------------- 1 | # Install Sametime Componentes that use WebSphere Applications Server, see below: 2 | # - Sametime Proxy, 3 | # - Sametime Meetings, 4 | # - Sametime Media Manager 5 | # - Sametime Video Manager 6 | # 7 | # Variables used in this playbook that can be setup at hosts file. 8 | # 9 | --- 10 | - hosts: media-manager-servers 11 | become: true 12 | #serial: 1 13 | roles: 14 | - roles/sametime-was-server-install 15 | vars: 16 | #tmp_dir: "/opt/IBM/Binaries" 17 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd-complete.yml: -------------------------------------------------------------------------------- 1 | # Install WebSphere Application Server - Network Deployment 2 | # 3 | # Variables used in this playbook that can be setup at hosts file. 4 | # 5 | # HTTP server that has installation Files 6 | # was_repository_url: http://192.168.1.1/was/8.5.5 7 | # 8 | # How to Run 9 | # 10 | 11 | # ansible-playbook -i environments/hosts.development -u -k playbooks/ibm-was-nd-complete.yml 12 | # 13 | # 14 | #vars: 15 | #tmp_dir: "/opt/IBM/Binaries/was" 16 | #iim_install_location: "/opt/IBM/InstallationManager" 17 | #was_install_location: "/opt/IBM/WebSphere/AppServer" 18 | #imshared_location: "/opt/IBM/IMShared" 19 | 20 | #was_version: "8.5.5000.20130514_1044" 21 | #was_files: 22 | # - { file_name: WAS_ND_V8.5.5_1_OF_3.zip, check_sum: b1333962ba4b25c8632c7e4c82b472350337e99febac8f70ffbd551ca3905e83 } 23 | # - { file_name: WAS_ND_V8.5.5_2_OF_3.zip, check_sum: 440b7ed82089d43b1d45c1e908bf0a1951fed98f2542b6d37c8b5e7274c6b1c9 } 24 | # - { file_name: WAS_ND_V8.5.5_3_OF_3.zip, check_sum: b73ae070656bed6399a113c2db9fb0abaf5505b0d41c564bf2a58ce0b1e0dcd2 } 25 | 26 | #was_fp_version: "8.5.5011.20161206_1434" 27 | #was_fp_files: 28 | # - { file_name: 8.5.5-WS-WAS-FP011-part1.zip, check_sum: bd9b51bd6a8522da8a6a19fcb0cf0ccc9980b13f5da2a1bcd4db2242ae555a66 } 29 | # - { file_name: 8.5.5-WS-WAS-FP011-part2.zip, check_sum: 0ab936b38ebee485471ce9f6fdbf5c0a609f0ffa837247fb81db6935f5cc061c } 30 | 31 | #was_java_version: "8.0.2010.20160224_1829" 32 | #was_java_files: 33 | # - { file_name: 8.0.2.10-WS-IBMWASJAVA-Linux.zip, check_sum: 7338d90d760596d95eb9622aa6a5ceb21c5604cece702abeeb8565c331f2aaa1 } 34 | --- 35 | - name: Install WebSphere Application Server - Network Deployment 36 | hosts: dmgr,was_servers 37 | # serial: 2 38 | become: true 39 | roles: 40 | - roles/installation-manager-install 41 | - roles/was-nd-install 42 | - roles/was-nd-fix-install 43 | - roles/was-java-install 44 | 45 | - name: Install HTTP Servers 46 | hosts: ihs_servers 47 | become: true 48 | roles: 49 | - roles/installation-manager-install 50 | - roles/ibm-http-server-install 51 | - roles/ibm-http-server-fix-install 52 | - roles/ibm-http-config-plgwct 53 | - roles/ibm-http-adminctl-restart 54 | - roles/ibm-http-server-restart 55 | 56 | - name: Setup DMGR 57 | hosts: dmgr 58 | become: true 59 | roles: 60 | - roles/was-dmgr-create-profile 61 | - roles/was-dmgr-start 62 | - roles/was-dmgr-import-tls-cert 63 | - roles/was-dmgr-config-ldap 64 | - roles/was-dmgr-config-jvm 65 | - roles/was-dmgr-restart 66 | 67 | - name: Setup WAS Nodes 68 | hosts: was_servers 69 | serial: 1 70 | become: true 71 | roles: 72 | - roles/was-profile-create 73 | - roles/was-nodeagent-start 74 | 75 | - name: Setup HTTP Servers on DMGR 76 | hosts: dmgr 77 | become: true 78 | roles: 79 | - roles/was-dmgr-config-webserver -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/ibm-was-nd-fixes.yml: -------------------------------------------------------------------------------- 1 | # Install WebSphere Application Server - Network Deployment 2 | # 3 | # Variables used in this playbook that can be setup at hosts file. 4 | # 5 | --- 6 | - hosts: dmgr,was_servers 7 | become: true 8 | roles: 9 | - roles/was-profile-cleanup-logs 10 | - roles/was-backup-dir-pre-fixes-zip 11 | 12 | - hosts: dmgr 13 | become: true 14 | vars: 15 | #was_fp_version: "8.5.5012.20170627_1018" 16 | #__this_files: 17 | # - { file_name: 8.5.5-WS-WAS-FP011-part1.zip, check_sum: bd9b51bd6a8522da8a6a19fcb0cf0ccc9980b13f5da2a1bcd4db2242ae555a66 } 18 | # - { file_name: 8.5.5-WS-WAS-FP011-part2.zip, check_sum: 0ab936b38ebee485471ce9f6fdbf5c0a609f0ffa837247fb81db6935f5cc061c } 19 | roles: 20 | - roles/was-dmgr-stop 21 | - roles/was-killall-java 22 | - roles/was-profile-cleanup-temps 23 | - roles/was-nd-fix-install 24 | - roles/was-dmgr-start 25 | 26 | - hosts: was_servers 27 | become: true 28 | serial: 2 29 | vars: 30 | #was_fp_version: "8.5.5012.20170627_1018" 31 | roles: 32 | - roles/was-server-stop 33 | - roles/was-nodeagent-stop 34 | - roles/was-killall-java 35 | - roles/was-profile-cleanup-temps 36 | - roles/was-nd-fix-install 37 | - roles/was-nodeagent-start 38 | - roles/was-server-start 39 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/java-timezone-2018_2019/java-timezone-2018_2019.yml: -------------------------------------------------------------------------------- 1 | # Install Connections 6 2 | # 3 | # ansible-playbook -i environments/hosts.local -u -k playbooks/java-timezone-2018_2019.yml 4 | # 5 | --- 6 | - name: Atualiza Java Time Zone Table 7 | hosts: dmgr,was_servers 8 | become: true 9 | gather_facts: no 10 | vars: 11 | repository_url: "http://192.168.0.1/java/" 12 | file_name: "jtzu-1.7.18e.zip" 13 | __tmp_dir: "/tmp" 14 | 15 | tasks: 16 | - name: Create Temp directory 17 | file: 18 | path: "{{ __tmp_dir }}/jtzu-1.7.18e/" 19 | state: directory 20 | mode: 0755 21 | 22 | - name: Download Files 23 | get_url: 24 | url: "{{ repository_url }}/{{ file_name }}" 25 | dest: "{{ __tmp_dir }}/{{ file_name }}" 26 | mode: 0755 27 | checksum: sha256:9b599bbcd5bdc690c3d97a93da134a7eab1fca62a8a0ce47e54b376359160234 28 | 29 | - name: Extract Files 30 | unarchive: 31 | src: "{{ __tmp_dir }}/{{ file_name }}" 32 | dest: "{{ __tmp_dir }}/jtzu-1.7.18e/" 33 | copy: no 34 | mode: 0755 35 | 36 | - name: "Generate DirectorySearch.txt" 37 | template: 38 | src: "DirectorySearch.txt.j2" 39 | dest: "{{ __tmp_dir }}/jtzu-1.7.18e/DirectorySearch.txt" 40 | 41 | - name: "Generate runjtzuenv_discover_only" 42 | template: 43 | src: "runjtzuenv_discover_only.sh.j2" 44 | dest: "{{ __tmp_dir }}/jtzu-1.7.18e/runjtzuenv.sh" 45 | 46 | - name: "Run runjtzu.sh" 47 | command: 48 | chdir={{ __tmp_dir }}/jtzu-1.7.18e 49 | {{ __tmp_dir }}/jtzu-1.7.18e/runjtzu.sh 50 | register: cout 51 | 52 | #- debug: msg={{ cout }} 53 | 54 | - name: "Generate runjtzuenv_apply_fix" 55 | template: 56 | src: "runjtzuenv_apply_fix.sh.j2" 57 | dest: "{{ __tmp_dir }}/jtzu-1.7.18e/runjtzuenv.sh" 58 | #changed_when: (cout.stdout.find('tzdata2018e') != -1) 59 | 60 | - name: "Run runjtzu.sh" 61 | shell: "{{ __tmp_dir }}/jtzu-1.7.18e/runjtzu.sh" 62 | args: 63 | chdir: "{{ __tmp_dir }}/jtzu-1.7.18e" 64 | register: cout 65 | changed_when: cout.rc == 0 66 | failed_when: cout.rc != 0 67 | #changed_when: (cout.stdout.find('tzdata2018e') != -1) 68 | 69 | - debug: msg={{ cout }} 70 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/java-timezone-2018_2019/templates/DirectorySearch.txt.j2: -------------------------------------------------------------------------------- 1 | +/opt/IBM/WebSphere/AppServer/ 2 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/java-timezone-2018_2019/templates/runjtzuenv_apply_fix.sh.j2: -------------------------------------------------------------------------------- 1 | #set java path up to the Jre in JAVA_HOME 2 | JAVA_HOME=/opt/IBM/WebSphere/AppServer/java 3 | 4 | #set NOGUI 5 | NOGUI=true 6 | 7 | #set DISCOVERONLY 8 | DISCOVERONLY=false 9 | 10 | #set SILENTPATCH 11 | SILENTPATCH=true 12 | 13 | #set BACKWARDCOMPATIBILITY 14 | BACKWARDCOMPATIBILITY=false 15 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/java-timezone-2018_2019/templates/runjtzuenv_discover_only.sh.j2: -------------------------------------------------------------------------------- 1 | #set java path up to the Jre in JAVA_HOME 2 | JAVA_HOME=/opt/IBM/WebSphere/AppServer/java 3 | 4 | #set NOGUI 5 | NOGUI=true 6 | 7 | #set DISCOVERONLY 8 | DISCOVERONLY=true 9 | 10 | #set SILENTPATCH 11 | SILENTPATCH=false 12 | 13 | #set BACKWARDCOMPATIBILITY 14 | BACKWARDCOMPATIBILITY=false 15 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/java-timezone-2019_2020.yml: -------------------------------------------------------------------------------- 1 | # Install Connections 6 2 | # 3 | # ansible-playbook -i environments/hosts.local -u -k playbooks/java-timezone-2018_2019.yml 4 | # 5 | --- 6 | - name: Atualiza Java Time Zone Table 7 | hosts: dmgr,was_servers 8 | become: true 9 | gather_facts: no 10 | vars: 11 | repository_url: "http://192.168.0.1/java/" 12 | file_name: "jtzu-1.7.19c.zip" 13 | jtzu_version: "jtzu-1.7.19c" 14 | __tmp_dir: "/tmp" 15 | 16 | tasks: 17 | - name: Create Temp directory 18 | file: 19 | path: "{{ __tmp_dir }}/{{ jtzu_version }}/" 20 | state: directory 21 | mode: 0755 22 | 23 | - name: Download Files 24 | get_url: 25 | url: "{{ repository_url }}/{{ file_name }}" 26 | dest: "{{ __tmp_dir }}/{{ file_name }}" 27 | mode: 0755 28 | 29 | - name: Extract Files 30 | unarchive: 31 | src: "{{ __tmp_dir }}/{{ file_name }}" 32 | dest: "{{ __tmp_dir }}/{{ jtzu_version }}/" 33 | copy: no 34 | mode: 0755 35 | 36 | - name: "Generate DirectorySearch.txt" 37 | shell: | 38 | echo '+/opt/IBM/WebSphere/AppServer/' > {{ __tmp_dir }}/{{ jtzu_version}}/DirectorySearch.txt 39 | # template: 40 | # src: "DirectorySearch.txt.j2" 41 | # dest: "{{ __tmp_dir }}/{{ jtzu_version}}/DirectorySearch.txt" 42 | 43 | - name: "Generate runjtzuenv_discover_only" 44 | shell: | 45 | echo '#set java path up to the Jre in JAVA_HOME 46 | JAVA_HOME=/opt/IBM/WebSphere/AppServer/java 47 | 48 | #set NOGUI 49 | NOGUI=true 50 | 51 | #set DISCOVERONLY 52 | DISCOVERONLY=true 53 | 54 | #set SILENTPATCH 55 | SILENTPATCH=false 56 | 57 | #set BACKWARDCOMPATIBILITY 58 | BACKWARDCOMPATIBILITY=false' > {{ __tmp_dir }}/{{ jtzu_version}}/runjtzuenv.sh 59 | # template: 60 | # src: "runjtzuenv_discover_only.sh.j2" 61 | # dest: "{{ __tmp_dir }}/{{ jtzu_version}}/runjtzuenv.sh" 62 | 63 | - name: "Run runjtzu.sh" 64 | command: 65 | chdir={{ __tmp_dir }}/{{ jtzu_version }} 66 | {{ __tmp_dir }}/{{ jtzu_version }}/runjtzu.sh 67 | register: cout 68 | 69 | #- debug: msg={{ cout }} 70 | 71 | - name: "Generate runjtzuenv_apply_fix" 72 | shell: | 73 | echo '#set java path up to the Jre in JAVA_HOME 74 | JAVA_HOME=/opt/IBM/WebSphere/AppServer/java 75 | 76 | #set NOGUI 77 | NOGUI=true 78 | 79 | #set DISCOVERONLY 80 | DISCOVERONLY=false 81 | 82 | #set SILENTPATCH 83 | SILENTPATCH=false 84 | 85 | #set BACKWARDCOMPATIBILITY 86 | BACKWARDCOMPATIBILITY=false' > {{ __tmp_dir }}/{{ jtzu_version}}/runjtzuenv.sh 87 | # template: 88 | # src: "runjtzuenv_apply_fix.sh.j2" 89 | # dest: "{{ __tmp_dir }}/{{ jtzu_version }}/runjtzuenv.sh" 90 | # #changed_when: (cout.stdout.find('tzdata2018e') != -1) 91 | 92 | - name: "Run runjtzu.sh" 93 | shell: "{{ __tmp_dir }}/{{ jtzu_version }}/runjtzu.sh" 94 | args: 95 | chdir: "{{ __tmp_dir }}/{{ jtzu_version }}" 96 | register: cout 97 | changed_when: cout.rc == 0 98 | failed_when: cout.rc != 0 99 | #changed_when: (cout.stdout.find('tzdata2018e') != -1) 100 | 101 | - debug: msg={{ cout }} 102 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-backup-dir-pre-fixes.yml: -------------------------------------------------------------------------------- 1 | # Backup WAS before Fix 2 | # 3 | # How to run: 4 | # ansible-playbook -i hosts.connections -u -k ansible-ibm-websphere/playbooks/was-backup-dir-pre-fixes.yml 5 | --- 6 | - name: Backup WebSphere DMGR and Nodes pre Fixes 7 | hosts: dmgr, was_servers 8 | become: true 9 | vars: 10 | #__ibm_dir: "{{ ibm_dir | default('/opt/IBM') }}" 11 | #__bkp_dir: "{{ bkp_dir | default('/opt/IBM/Backup') }}" 12 | #__now_tmp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 13 | #__now: "{{ __now_tmp }}" 14 | 15 | roles: 16 | - roles/was-backup-dir-pre-fixes 17 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-config-systemd.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Config WAS on Systemd 3 | hosts: dmgr,was_servers 4 | # serial: 1 5 | become: true 6 | roles: 7 | - roles/was-config-systemd 8 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-delete-all.yml: -------------------------------------------------------------------------------- 1 | # Delete directories - BE CAREFULL 2 | # 3 | # ansible-playbook -i environments/hosts.development -u -k playbooks/ibm-was-nd/was-delete-all.yml 4 | --- 5 | - hosts: dmgr,was_servers 6 | become: true 7 | tasks: 8 | - name: KillAll Java 9 | command: killall -9 java 10 | register: cout 11 | #with_items: 12 | #- "{{ __ibm_dir }}/Connections" 13 | ignore_errors: true 14 | 15 | - name: "Cleanup All directories" 16 | file: 17 | path: "{{ item }}" 18 | state: absent 19 | with_items: 20 | - /var/ibm 21 | - /opt/IBM/Binaries 22 | - /opt/IBM/InstallationManager 23 | - /opt/IBM/WebSphere 24 | - /opt/IBM/IMShared 25 | - /etc/.ibm 26 | 27 | - name: Delete Connections directory 28 | file: 29 | path: "{{ item }}" 30 | state: absent 31 | with_items: 32 | - "/opt/IBM/Connections" 33 | - "/opt/IBM/CTemp" 34 | - "/var/.com.zerog.registry.xml" 35 | - "/root/.InstallAnywhere" 36 | - "/root/.java" 37 | ignore_errors: true 38 | 39 | - hosts: ihs_servers 40 | become: true 41 | tasks: 42 | - name: KillAll Java 43 | command: killall -9 httpd 44 | register: cout 45 | #with_items: 46 | #- "{{ __ibm_dir }}/Connections" 47 | ignore_errors: true 48 | 49 | - name: "Cleanup All directories" 50 | file: 51 | path: "{{ item }}" 52 | state: absent 53 | with_items: 54 | - /var/ibm 55 | - /opt/IBM/Binaries 56 | - /opt/IBM/InstallationManager 57 | - /opt/IBM/HTTPServer 58 | - /opt/IBM/WebSphere 59 | - /opt/IBM/IMShared 60 | - /etc/.ibm 61 | - /root/.ibm -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-dmgr-start.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-server-start.yml 4 | # 5 | --- 6 | - name: Start Deployment Manager 7 | hosts: dmgr 8 | become: true 9 | vars: 10 | #__profile_name: "{{ profile_name | default('Dmgr01') }}" 11 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 12 | roles: 13 | - was-dmgr-start 14 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-dmgr-stop.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-server-start.yml 4 | # 5 | --- 6 | - name: Stop Deployment Manager 7 | hosts: dmgr 8 | become: true 9 | vars: 10 | #__profile_name: "{{ profile_name | default('Dmgr01') }}" 11 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 12 | roles: 13 | - was-dmgr-stop 14 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-nodeagent-start.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-server-start.yml 4 | # 5 | --- 6 | - name: Start Nodeagent 7 | hosts: was_servers 8 | become: true 9 | vars: 10 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 11 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 12 | roles: 13 | - was-nodeagent-start 14 | 15 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-nodeagent-stop.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-server-start.yml 4 | # 5 | --- 6 | - name: Stop Nodeagent 7 | hosts: was_servers 8 | become: true 9 | vars: 10 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 11 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 12 | roles: 13 | - was-nodeagent-stop 14 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-profile-cleanup-logs.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-profile-cleanup-logs.yml 4 | # 5 | --- 6 | - name: Cleanup and Truncate files on Log directory 7 | hosts: dmgr, was_servers 8 | become: true 9 | vars: 10 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 11 | ##__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 12 | #__was_install_location: "/opt/IBM/WebSphere/AppServer" 13 | roles: 14 | - was-profile-cleanup-logs 15 | 16 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-profile-cleanup-temps.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-profile-cleanup-temps.yml 4 | # 5 | --- 6 | - name: Cleanup and Truncate files on Log directory 7 | hosts: dmgr, was_servers 8 | serial: 1 # run sequentially 9 | become: true 10 | vars: 11 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 12 | ##__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 13 | #__was_install_location: "/opt/IBM/WebSphere/AppServer" 14 | roles: 15 | - was-profile-cleanup-temps 16 | 17 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-profile-delete-all.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbook -i hosts.development -k ansible-ibm-websphere/playbooks/was-dmgr-create-profile.yml 4 | # 5 | --- 6 | - name: DeleteAll WAS Profile 7 | hosts: dmgr,was_servers 8 | become: true 9 | vars: 10 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 11 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 12 | roles: 13 | - was-profile-delete-all 14 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-server-start.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbook -i hosts.development -k ansible-ibm-websphere/playbooks/was-server-start.yml 4 | # 5 | --- 6 | - name: Start WAS Servers 7 | hosts: was_servers 8 | serial: 1 # run sequentially 9 | become: true 10 | vars: 11 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 12 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 13 | #__servers: "{{ servers }}" 14 | roles: 15 | - was-server-start 16 | 17 | -------------------------------------------------------------------------------- /playbooks/ibm-was-nd/was-server-stop.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-server-start.yml 4 | # 5 | --- 6 | - name: Stop WAS Servers 7 | hosts: was_servers 8 | serial: 1 # run sequentially 9 | become: true 10 | vars: 11 | #__profile_name: "{{ profile_name | default('AppSrv01') }}" 12 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 13 | #__servers: "{{ servers }}" 14 | roles: 15 | - was-server-stop 16 | -------------------------------------------------------------------------------- /roles/connections-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: cnx_repository_url should be defined 3 | assert: 4 | that: 5 | - cnx_repository_url is defined and cnx_repository_url != '' 6 | msg: "Set the value of 'cnx_repository_url' in the inventory file." 7 | 8 | - name: dmgr_hostname should be defined 9 | assert: 10 | that: 11 | - dmgr_hostname is defined and dmgr_hostname != '' 12 | msg: "Set the value of 'dmgr_hostname' in the inventory file." 13 | 14 | - name: was_username should be defined 15 | assert: 16 | that: 17 | - was_username is defined and was_username != '' 18 | msg: "Set the value of 'was_username' in the inventory file." 19 | 20 | - name: was_password should be defined 21 | assert: 22 | that: 23 | - was_password is defined and was_password != '' 24 | msg: "Set the value of 'was_password' in the inventory file." 25 | 26 | - name: was_domainname should be defined 27 | assert: 28 | that: 29 | - was_domainname is defined and was_domainname != '' 30 | msg: "Set the value of 'was_domainname' in the inventory file." 31 | 32 | - name: cnx_domainname should be defined 33 | assert: 34 | that: 35 | - cnx_domainname is defined and cnx_domainname != '' 36 | msg: "Set the value of 'cnx_domainname' in the inventory file." 37 | 38 | - name: smtp_hostname should be defined 39 | assert: 40 | that: 41 | - smtp_hostname is defined and smtp_hostname != '' 42 | msg: "Set the value of 'smtp_hostname' in the inventory file." 43 | -------------------------------------------------------------------------------- /roles/connections-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Is Product already Installed? 3 | command: "egrep {{ __product_id }} /var/ibm/InstallationManager/installed.xml" 4 | register: version_already_installed 5 | ignore_errors: true 6 | 7 | - name: "Use Fix Pack 6.0.4 CR4?" 8 | set_fact: 9 | # __cnx_fixes_files: "{{ __cnx_fixes_files_cr3 }}" 10 | __this_version: "6.0.0.0_20190131_2215" 11 | __version_check: "Updated to com.ibm.connections.6.0.0.0_20190131_2215" 12 | __product_id: "\"id='com.ibm.connections' version='6.0.0.0_20190131_2215'\"" 13 | when: ( __cnx_fixes_version == __cnx_fixes_version_cr4 ) 14 | 15 | - name: "Use Fix Pack 6.0.3 CR3?" 16 | set_fact: 17 | # __cnx_fixes_files: "{{ __cnx_fixes_files_cr3 }}" 18 | __this_version: "6.0.0.0_20180927_0113" 19 | __version_check: "Updated to com.ibm.connections.6.0.0.0_20180927_0113" 20 | __product_id: "\"id='com.ibm.connections' version='6.0.0.0_20180927_0113'\"" 21 | when: ( __cnx_fixes_version == __cnx_fixes_version_cr3 ) 22 | 23 | # __cnx_version_cr3: "6.0.0.0_20180927_0113" 24 | #__cnx_version_check_cr3: "Installed com.ibm.connections.6.0.0.0_20180927_0113" 25 | 26 | #__this_version: "{{ cnx_version | default('6.0.0.0_20190131_2215') }}" 27 | #__product_id: "\"id='com.ibm.connections'\"" 28 | #__version_check: "Installed com.ibm.connections.6.0.0.0_20190131_2215" -------------------------------------------------------------------------------- /roles/connections-install/tasks/download_extract_connections.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }}/{{ item }} state=absent 4 | ignore_errors: true 5 | with_items: 6 | - "cnx" 7 | - "cnx-cr" 8 | - "CTemp" 9 | 10 | - name: Create Binaries directory 11 | file: path={{ __tmp_dir }}/{{ item }} state=directory mode=0755 12 | with_items: 13 | - "cnx" 14 | - "cnx-cr" 15 | - "CTemp" 16 | 17 | - name: Create Logs directory 18 | file: path={{ __logs_dir }} state=directory mode=0755 19 | 20 | - name: Download Installer 21 | get_url: 22 | url: "{{ cnx_repository_url }}/{{ item.file_name }}" 23 | dest: "{{ __tmp_dir }}/cnx/{{ item.file_name }}" 24 | mode: 0755 25 | checksum: sha256:{{ item.check_sum }} 26 | with_items: "{{ __cnx_files }}" 27 | 28 | - name: Extract Installer 29 | unarchive: 30 | src: "{{ __tmp_dir }}/cnx/{{ item.file_name }}" 31 | dest: "{{ __tmp_dir }}/cnx/" 32 | copy: no 33 | with_items: "{{ __cnx_files }}" 34 | 35 | - name: Download Installer CCM 36 | get_url: 37 | url: "{{ cnx_repository_url }}/{{ item.file_name }}" 38 | dest: "{{ __tmp_dir }}/cnx/{{ item.file_name }}" 39 | mode: 0755 40 | checksum: sha256:{{ item.check_sum }} 41 | with_items: "{{ __ccm_files }}" 42 | when: (ccm_install is defined) 43 | 44 | - name: "Download Installer Connections CR Fixes" 45 | get_url: 46 | url: "{{ cnx_fixes_repository_url }}/{{ item.file_name }}" 47 | dest: "{{ __tmp_dir }}/cnx-cr/{{ item.file_name }}" 48 | mode: 0755 49 | checksum: sha256:{{ item.check_sum }} 50 | with_items: "{{ __cnx_fixes_files }}" 51 | when: (cnx_fixes_version is defined) 52 | 53 | - name: "Extract Installer Connections CR Fixes" 54 | unarchive: 55 | src: "{{ __tmp_dir }}/cnx-cr/{{ item.file_name }}" 56 | dest: "{{ __tmp_dir }}/cnx-cr/" 57 | copy: no 58 | with_items: "{{ __cnx_fixes_files }}" 59 | when: (cnx_fixes_version is defined) -------------------------------------------------------------------------------- /roles/connections-install/tasks/install_connections.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Encode Password XOR 3 | shell: "echo \"xpw={{ was_password }}\" > {{__logs_dir}}/xor.props && {{__was_install_location}}/bin/PropFilePasswordEncoder.sh {{__logs_dir}}/xor.props xpw > /dev/null && cat {{__logs_dir}}/xor.props | awk -F= '{ printf $2\"=\"}'" 4 | register: __xor_encoded_password 5 | changed_when: ( __xor_encoded_password.rc == 0) 6 | 7 | #- debug: var=__xor_encoded_password 8 | 9 | - name: Encode WAS Password 10 | command: "{{ __iim_install_location }}/eclipse/tools/imutilsc encryptString {{ was_password }} -silent -noSplash" 11 | register: __was_encoded_password 12 | changed_when: ( __was_encoded_password.rc == 0) 13 | 14 | - name: Encode DB Passwords 15 | command: "{{ __iim_install_location }}/eclipse/tools/imutilsc encryptString {{ item.pw }} -silent -noSplash" 16 | register: __cnx_db_info_results 17 | #changed_when: ( item.encoded_pw.rc == 0) 18 | with_items: "{{ __cnx_db_info }}" 19 | 20 | - name: Encode CCM Password 21 | command: "{{ __iim_install_location }}/eclipse/tools/imutilsc encryptString {{ ccm_password }} -silent -noSplash" 22 | register: __ccm_encoded_password 23 | changed_when: ( __ccm_encoded_password.rc == 0) 24 | when: ( ccm_install is defined ) 25 | 26 | - debug: var=__ccm_encoded_password 27 | 28 | - name: Encode DB Passwords for CCM 29 | command: "{{ __iim_install_location }}/eclipse/tools/imutilsc encryptString {{ item.pw }} -silent -noSplash" 30 | register: __ccm_db_info_results 31 | with_items: "{{ __ccm_db_info }}" 32 | when: ( ccm_install is defined ) 33 | 34 | - name: Generate Response file 35 | template: 36 | src: "{{ __tpl_file }}" 37 | dest: "{{ __rsp_file }}" 38 | 39 | - name: Disable Repository on Installation Manager 40 | replace: 41 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 42 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 43 | replace: '\1RepositoryIsOpen=false\2' 44 | backup: yes 45 | ignore_errors: true 46 | 47 | - name: Change SOAP request timeout 48 | replace: 49 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}/properties/soap.client.props" 50 | regexp: '(\s*)com.ibm.SOAP.requestTimeout=180(\s*)' 51 | replace: '\1com.ibm.SOAP.requestTimeout=600\2' 52 | backup: yes 53 | ignore_errors: true 54 | 55 | # Changed for shell for CCM 56 | - name: Install Connections Software 57 | shell: | 58 | mkdir -p /opt/IBM/CTemp 59 | export IATEMPDIR=/opt/IBM/CTemp 60 | export CHECK_DISK_SPACE=OFF 61 | {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 62 | environment: 63 | IATEMPDIR: "/opt/IBM/CTemp" 64 | register: cout 65 | # changed_when: ( cout.stdout.find(__version_check) != -1) 66 | 67 | 68 | - name: Cleanup Binaries directory 69 | file: 70 | state: absent 71 | path: "{{ __tmp_dir }}/{{ items }}" 72 | with_items: 73 | - cnx 74 | - cnx-cr 75 | -------------------------------------------------------------------------------- /roles/connections-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: Setup Operating System 6 | include_tasks: setup_os.yml 7 | 8 | - name: Define Vars 9 | include_tasks: define_vars.yml 10 | 11 | - name: Download and Extract Connections Files 12 | include_tasks: download_extract_connections.yml 13 | when: version_already_installed.rc != 0 14 | 15 | - include_tasks: install_connections.yml 16 | when: version_already_installed.rc != 0 17 | 18 | 19 | -------------------------------------------------------------------------------- /roles/connections-install/tasks/setup_os.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: Install pre-requisites Apt 3 | # apt: 4 | # name: ['unzip', 'tar', 'wget'] 5 | # state: present 6 | # when: ansible_os_family == "Debian" 7 | # 8 | - name: Install pre-requisites Zypper 9 | zypper: 10 | name: ['glibc-32bit','libgtk-2_0-0-32bit'] 11 | state: present 12 | when: ansible_os_family == "Suse" 13 | 14 | - name: Install pre-requisites Yum 15 | yum: 16 | name: ['nfs-utils', 'gtk2', 'libXtst', 'xorg-x11-fonts-Type1', 'psmisc', 'glibc.i686', 'gtk2.i686', 'libXtst.i686', 'libXft.i686', 'compat-libstdc++-33.i686'] 17 | state: present 18 | when: 19 | - ansible_os_family == "RedHat" 20 | - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Amazon") 21 | 22 | #- name: Install pre-requisites Dnf 23 | # dnf: 24 | # name: ['unzip', 'tar', 'wget'] 25 | # state: present 26 | # when: 27 | # - ansible_os_family == "RedHat" 28 | # - (ansible_distribution != "CentOS" or ansible_distribution != "Amazon") -------------------------------------------------------------------------------- /roles/connections-install/templates/LC.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {% if cnx_fixes_version is defined %} 9 | 10 | {% endif %} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | {% for app in __cnx_deploy %} 34 | 35 | 36 | {% endfor %} 37 | {% if ccm_install is defined %} 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | {% endif %} 52 | 53 | {% for app in __cnx_deploy %} 54 | 55 | 56 | 57 | 58 | 59 | 60 | {% endfor %} 61 | {% if ccm_install is defined %} 62 | {% for app in __ccm_deploy %} 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | {% endfor %} 72 | {% endif %} 73 | 74 | {% for db in __cnx_db_info_results.results %} 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | {% endfor %} 83 | {% if ccm_install is defined %} 84 | 85 | 86 | {% for db in __ccm_db_info_results.results %} 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | {% endfor %} 95 | {% endif %} 96 | 97 | 98 | 99 | 100 | 101 | 102 | {% if ccm_install is defined %} 103 | 104 | 105 | 106 | {% endif %} 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /roles/db2-jdbc-driver-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: jdbc_repository_url should be defined 3 | assert: 4 | that: 5 | - jdbc_repository_url is defined and jdbc_repository_url != '' 6 | msg: "Set the value of 'jdbc_repository_url' in the inventory file." 7 | 8 | - name: "Verifiy if jdbc already exists" 9 | stat: 10 | path: "{{ __jdbc_location }}/" 11 | register: jdbc_already_exists 12 | 13 | - name: "Create JDBC directory" 14 | file: path={{ __jdbc_location }} state=directory mode=0755 15 | when: jdbc_already_exists.stat.exists != true 16 | 17 | - name: Download WAS Java 18 | get_url: 19 | url: "{{ jdbc_repository_url }}/{{ item.file_name }}" 20 | dest: "{{ __jdbc_location }}/{{ item.file_name }}" 21 | mode: 0755 22 | checksum: sha256:{{ item.check_sum }} 23 | with_items: "{{ __files_latest }}" 24 | when: jdbc_already_exists.stat.exists != true 25 | -------------------------------------------------------------------------------- /roles/db2-jdbc-driver-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __jdbc_location: "{{ jdbc_location | default('/opt/IBM/db2/V11.1/java') }}" 3 | 4 | __files_latest: 5 | - { file_name: db2jcc4.jar, check_sum: 2107521ae05bd66260ed2bc89f393015d5ea8f3927bcdf0cffdb9a09ad8298dc } 6 | 7 | -------------------------------------------------------------------------------- /roles/ibm-http-adminctl-restart/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is AdminCtl Running?" 3 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/admin.pid"` 4 | register: ihs_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop AdminCtl" 8 | command: "{{ __ihs_install_location }}/bin/adminctl stop" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: ihs_is_running.rc == 0 12 | 13 | - name: Wait 10 seconds to start ihs 14 | pause: 15 | seconds: 10 16 | 17 | - name: "Is AdminCtl Running?" 18 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/admin.pid"` 19 | register: ihs_is_running 20 | ignore_errors: true 21 | 22 | - name: "Start AdminCtl" 23 | command: "{{ __ihs_install_location }}/bin/adminctl start" 24 | register: ihs_start 25 | changed_when: ihs_start.rc == 0 26 | failed_when: ihs_start.rc != 0 27 | when: ihs_is_running.rc != 0 28 | 29 | - name: "Is AdminCtl Running?" 30 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/admin.pid"` 31 | register: ihs_is_running 32 | ignore_errors: true 33 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 34 | 35 | - name: Wait 10 seconds for ihs to activate 36 | pause: 37 | seconds: 10 38 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 39 | -------------------------------------------------------------------------------- /roles/ibm-http-adminctl-restart/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | -------------------------------------------------------------------------------- /roles/ibm-http-adminctl-start/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is AdminCtl Running?" 3 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/admin.pid"` 4 | register: ihs_is_running 5 | ignore_errors: true 6 | 7 | - name: "Start AdminCtl" 8 | command: "{{ __ihs_install_location }}/bin/adminctl start" 9 | register: ihs_start 10 | changed_when: ihs_start.rc == 0 11 | failed_when: ihs_start.rc != 0 12 | when: ihs_is_running.rc != 0 13 | 14 | - name: "Is AdminCtl Running?" 15 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/admin.pid"` 16 | register: ihs_is_running 17 | ignore_errors: true 18 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 19 | 20 | - name: Wait 10 seconds for AdminCtl to activate 21 | pause: 22 | seconds: 10 23 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 24 | -------------------------------------------------------------------------------- /roles/ibm-http-adminctl-start/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | -------------------------------------------------------------------------------- /roles/ibm-http-adminctl-stop/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is AdminCtl Running?" 3 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/admin.pid"` 4 | register: ihs_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop AdminCtl" 8 | command: "{{ __ihs_install_location }}/bin/adminctl stop" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: ihs_is_running.rc == 0 12 | -------------------------------------------------------------------------------- /roles/ibm-http-adminctl-stop/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | -------------------------------------------------------------------------------- /roles/ibm-http-config-plgwct/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check defined variables 2 | --- 3 | - name: ihs_password should be defined 4 | assert: 5 | that: 6 | - ihs_password is defined and ihs_password != '' 7 | msg: "Set the value of 'ihs_password' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/ibm-http-config-plgwct/tasks/config_plgwct.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Generate Response file" 3 | template: 4 | src: "{{ __tpl_file }}" 5 | dest: "{{ __rsp_file }}" 6 | when: plugin_already_configured.stat.exists == false 7 | 8 | - name: "Configure WebSphere Plugin" 9 | command: 10 | chdir={{ __wct_install_location }} 11 | {{ __wct_install_location }}/WCT/wctcmd.sh -tool pct -createDefinition -defLocName {{ __ihs_hostname }} -defLocPathname {{ __plg_install_location }} -response {{ __rsp_file }} -logLevel 7 12 | register: cout 13 | changed_when: cout.rc == 0 14 | when: plugin_already_configured.stat.exists == false 15 | 16 | - name: "Change admin.passwd" 17 | command: "{{ __ihs_install_location }}/bin/htpasswd -bcm {{ __ihs_install_location }}/conf/admin.passwd {{ __ihs_username }} {{ ihs_password }}" 18 | register: cout 19 | changed_when: cout.rc == 0 20 | # failed_when: cout.rc != 0 21 | when: plugin_already_configured.stat.exists == false 22 | -------------------------------------------------------------------------------- /roles/ibm-http-config-plgwct/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Verify if httpd.conf is already configured checking if hostname is already defined. 3 | - name: "Verifiy if Plugin already configured" 4 | stat: 5 | path: "{{__plg_install_location}}/config/{{ __ihs_hostname }}/plugin-cfg.xml" 6 | register: plugin_already_configured -------------------------------------------------------------------------------- /roles/ibm-http-config-plgwct/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: Define Vars 6 | include_tasks: define_vars.yml 7 | 8 | - name: Config Plugin WCT 9 | include_tasks: config_plgwct.yml 10 | -------------------------------------------------------------------------------- /roles/ibm-http-config-plgwct/templates/config_plugin_wct.rsp.j2: -------------------------------------------------------------------------------- 1 | configType=remote 2 | enableAdminServerSupport=true 3 | enableUserAndPass=true 4 | enableWinService=false 5 | ihsAdminCreateUserAndGroup=true 6 | ihsAdminPassword={{ ihs_password }} 7 | ihsAdminPort={{ __ihs_admin_port }} 8 | ihsAdminUnixUserGroup={{ __ihs_admins_group }} 9 | ihsAdminUnixUserID={{ __ihs_username }} 10 | mapWebServerToApplications=true 11 | wasMachineHostname={{ __ihs_hostname_fqdn }} 12 | webServerConfigFile1={{ __ihs_install_location }}/conf/httpd.conf 13 | webServerSelected=ihs 14 | webServerDefinition={{ __ihs_hostname }} 15 | webServerHostName={{ __ihs_hostname_fqdn }} 16 | webServerInstallArch=64 17 | webServerPortNumber=80 18 | -------------------------------------------------------------------------------- /roles/ibm-http-config-plgwct/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 3 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 4 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 5 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 6 | __plg_install_location: "{{ plg_install_location | default('/opt/IBM/WebSphere/Plugins') }}" 7 | __wct_install_location: "{{ wct_install_location | default('/opt/IBM/WebSphere/Toolbox') }}" 8 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 9 | 10 | __ihs_admin_port: "{{ ihs_admin_port | default('8085') }}" 11 | __ihs_username: "{{ ihs_username | default('ihsadmin') }}" 12 | __ihs_admins_group: "{{ ihs_admins_group | default('ihsadmins') }}" 13 | __ihs_arch: "{{ ihs_arch | default('linux') }}" 14 | __ihs_hostname: "{{ inventory_hostname_short }}" 15 | __ihs_hostname_fqdn: "{{ inventory_hostname }}" 16 | 17 | __rsp_file: "{{ __logs_dir }}/config_plugin_wct.rsp" 18 | __tpl_file: "config_plugin_wct.rsp.j2" 19 | -------------------------------------------------------------------------------- /roles/ibm-http-httpdconf/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Backup Connections Directories 3 | command: cp {{ __ihs_install_location }}/conf/httpd.conf {{ __ihs_install_location }}/conf/httpd.conf_{{ __now }} 4 | 5 | - name: "Generate Response file" 6 | template: 7 | src: "httpd.conf.j2" 8 | dest: "{{ __ihs_install_location }}/conf/httpd.conf" 9 | # when: plugin_already_configured.stat.exists == false 10 | -------------------------------------------------------------------------------- /roles/ibm-http-httpdconf/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 4 | 5 | __ihs_hostname: "{{ inventory_hostname_short }}" 6 | __ihs_hostname_fqdn: "{{ inventory_hostname }}" 7 | 8 | 9 | __sharedarea : "{{ sharedarea | default('/opt/IBM/SharedArea') }}" 10 | 11 | __ssh_keyfile : "{{ ssh_keyfile | default('connections.company.com') }}" 12 | __cnx_fqdn : "{{ cnx_fqdn | default('connections.company.com') }}" 13 | __cnx_domain : "{{ cnx_domain | default('company.com') }}" 14 | 15 | -------------------------------------------------------------------------------- /roles/ibm-http-server-fix-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check_openshift.yml 2 | --- 3 | - name: ihs_repository_url should be defined 4 | assert: 5 | that: 6 | - ihs_repository_url is defined and ihs_repository_url != '' 7 | msg: "Set the value of 'ihs_repository_url' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/ibm-http-server-fix-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Use Fix Pack 14? 3 | set_fact: 4 | __this_files: "{{ __ihs_files_fp14 }}" 5 | __version_check: "Updated to com.ibm.websphere.IHS.v85_{{ __this_version }}" 6 | __product_id: "\"id='com.ibm.websphere.IHS.v85' version='{{ __this_version }}'\"" 7 | when: ( __this_version == __ihs_version_fp14 ) 8 | 9 | - name: Use Fix Pack 12? 10 | set_fact: 11 | __this_files: "{{ __ihs_files_fp12 }}" 12 | __version_check: "Updated to com.ibm.websphere.IHS.v85_{{ __this_version }}" 13 | __product_id: "\"id='com.ibm.websphere.IHS.v85' version='{{ __this_version }}'\"" 14 | when: ( __this_version == __ihs_version_fp12 ) 15 | 16 | - name: Use Fix Pack 11? 17 | set_fact: 18 | __this_files: "{{ __ihs_files_fp11 }}" 19 | __version_check: "Updated to com.ibm.websphere.IHS.v85_{{ __this_version }}" 20 | __product_id: "\"id='com.ibm.websphere.IHS.v85' version='{{ __this_version }}'\"" 21 | when: ( __this_version == __ihs_version_fp11 ) 22 | 23 | - name: Use Fix Pack 9? 24 | set_fact: 25 | __this_files: "{{ __ihs_files_fp9 }}" 26 | __version_check: "Updated to com.ibm.websphere.IHS.v85_{{ __this_version }}" 27 | __product_id: "\"id='com.ibm.websphere.IHS.v85' version='{{ __this_version }}'\"" 28 | when: ( __this_version == __ihs_version_fp9 ) 29 | 30 | - name: Is IIM Installed? 31 | command: "egrep {{ __iim_product_id }} /var/ibm/InstallationManager/installed.xml" 32 | register: iim_already_installed 33 | 34 | - name: Is IHS Installed? 35 | command: "egrep {{ __ihs_product_id }} /var/ibm/InstallationManager/installed.xml" 36 | register: ihs_already_installed 37 | 38 | - name: Is Product already Installed? 39 | command: "egrep {{ __product_id }} /var/ibm/InstallationManager/installed.xml" 40 | register: version_already_installed 41 | ignore_errors: true 42 | -------------------------------------------------------------------------------- /roles/ibm-http-server-fix-install/tasks/install_ihs_fixes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }} state=absent 4 | ignore_errors: true 5 | 6 | - name: Create Binaries directory 7 | file: path={{ __tmp_dir }} state=directory mode=0755 8 | 9 | - name: Create Logs directory 10 | file: path={{ __logs_dir }} state=directory mode=0755 11 | 12 | - name: Download WAS Supplements Fixes 13 | get_url: 14 | url: "{{ __repository_url }}/{{ item.file_name }}" 15 | dest: "{{ __tmp_dir }}/{{ item.file_name }}" 16 | mode: 0755 17 | checksum: sha256:{{ item.check_sum }} 18 | with_items: "{{ __this_files }}" 19 | 20 | - name: Extract WAS Supplements Fixes 21 | unarchive: 22 | src: "{{ __tmp_dir }}/{{ item.file_name }}" 23 | dest: "{{ __tmp_dir }}/" 24 | copy: no 25 | with_items: "{{ __this_files }}" 26 | 27 | - name: Generate Response file 28 | template: 29 | src: "{{ __tpl_file }}" 30 | dest: "{{ __rsp_file }}" 31 | 32 | - name: Disable Repository on Installation Manager 33 | replace: 34 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 35 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 36 | replace: '\1RepositoryIsOpen=false\2' 37 | backup: yes 38 | ignore_errors: true 39 | 40 | - name: Install IBM HTTP Server Fixes Software 41 | command: 42 | chdir={{ __tmp_dir }} 43 | {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 44 | register: cout 45 | changed_when: (cout.stdout.find(__version_check) != -1) 46 | 47 | #- debug: var=cout 48 | 49 | - name: Cleanup Binaries directory 50 | file: path={{ __tmp_dir }} state=absent 51 | -------------------------------------------------------------------------------- /roles/ibm-http-server-fix-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: Define Vars 6 | include_tasks: define_vars.yml 7 | 8 | - name: Install IBM HTTP Server - Fixes 9 | include_tasks: install_ihs_fixes.yml 10 | when: version_already_installed.rc != 0 11 | -------------------------------------------------------------------------------- /roles/ibm-http-server-fix-install/templates/ihs_plg_wct_fixes.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /roles/ibm-http-server-fix-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __repository_url: "{{ ihs_fixes_repository_url }}" 3 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/wassup_fixes" 4 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 5 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 6 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 7 | __plg_install_location: "{{ plg_install_location | default('/opt/IBM/WebSphere/Plugins') }}" 8 | __wct_install_location: "{{ wct_install_location | default('/opt/IBM/WebSphere/Toolbox') }}" 9 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 10 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 11 | __rsp_file: "{{ __logs_dir }}/ihs_plg_wct_fixes.rsp" 12 | __log_file: "{{ __logs_dir }}/ihs_fixes_install.{{ __now }}.log" 13 | __tpl_file: "ihs_plg_wct_fixes.rsp.j2" 14 | 15 | __ihs_fp_version_latest: "8.5.5015.20190128_1828" 16 | __ihs_fp_files_latest: 17 | - { file_name: 8.5.5-WS-WASSupplements-FP015-part1.zip, check_sum: a27e0d5acb4459dd64a511a96be75f5aa12571cae856ab5933768c70f516ab0a } 18 | - { file_name: 8.5.5-WS-WASSupplements-FP015-part2.zip, check_sum: e1d2e4891b9e185a597b56ed00564ebe2dd8f380fdd9a0895f84da2386d29737 } 19 | - { file_name: 8.5.5-WS-WASSupplements-FP015-part3.zip, check_sum: 972efc31c3c653413519a0d2cd47a0039efed4b3a7997af297839699b40d7c3d } 20 | 21 | __this_version: "{{ ihs_version | default( __ihs_fp_version_latest ) }}" 22 | __this_files: "{{ ihs_fp_files | default( __ihs_fp_files_latest ) }}" 23 | __version_check: "Updated to com.ibm.websphere.IHS.v85_{{ __this_version }}" 24 | __product_id: "\"id='com.ibm.websphere.IHS.v85' version='{{ __this_version }}'\"" 25 | 26 | __iim_product_id: "\"id='com.ibm.cic.agent\"" 27 | __ihs_product_id: "\"id='com.ibm.websphere.IHS.v85'\"" 28 | 29 | 30 | # Old Versions 31 | __ihs_version_fp14: "8.5.5014.20180802_1018" 32 | __ihs_files_fp14: 33 | - { file_name: 8.5.5-WS-WASSupplements-FP014-part1.zip, check_sum: 1e612c649db02c9841a2b79fe90a3cddf7269bc8a3f2675322b8e87891abe18e } 34 | - { file_name: 8.5.5-WS-WASSupplements-FP014-part2.zip, check_sum: 9f2b82ced9f644eb5fee24ffd6a832768e622b7f042b8dd707ce3fa985f62f0b } 35 | - { file_name: 8.5.5-WS-WASSupplements-FP014-part3.zip, check_sum: fdf736da2240f76f3b9b2c851450bbf79c87ed61f47e82e91162bc2749090cc9 } 36 | 37 | __ihs_version_fp12: "8.5.5012.20170627_1018" 38 | __ihs_files_fp12: 39 | - { file_name: 8.5.5-WS-WASSupplements-FP012-part1.zip, check_sum: 64f9a15dbc04df19010dab0d89d7097c4cab29d7e46648f233fd712638a91b3a } 40 | - { file_name: 8.5.5-WS-WASSupplements-FP012-part2.zip, check_sum: a569afabef483fe62fdd9a2fa74fc59d77cbdc946fb8f16d939b1f5a8d0eadb3 } 41 | - { file_name: 8.5.5-WS-WASSupplements-FP012-part3.zip, check_sum: fac3682336d396253f17d28ca2998ce0a5f61bc9a9b4bcc805c25cee710d10d8 } 42 | 43 | 44 | __ihs_version_fp11: "8.5.5011.20161206_1434" 45 | __ihs_files_fp11: 46 | - { file_name: 8.5.5-WS-WASSupplements-FP011-part1.zip, check_sum: 4a8f560c3b546321a7e67facc5c25255ecd11c6b29e3fed0a38f203dd339a771 } 47 | - { file_name: 8.5.5-WS-WASSupplements-FP011-part2.zip, check_sum: 6fec8b763020c72693a5a98ecba37c5f7778ab9bcf44b7089a9edb3dc51cb84c } 48 | - { file_name: 8.5.5-WS-WASSupplements-FP011-part3.zip, check_sum: fe0cbc3ad678c21bb43c588bcc80242d8556b80ca2f4c237e5cc97b271eeffc7 } 49 | 50 | __ihs_version_fp9: "8.5.5009.20160225_0435" 51 | __ihs_files_fp9: 52 | - { file_name: 8.5.5-WS-WASSupplements-FP0000009-part1.zip, check_sum: 736b3e13b3f38289aee4367c62b19ffcea06cf2ae4058fdb0197a3e1ec07fb27 } 53 | - { file_name: 8.5.5-WS-WASSupplements-FP0000009-part2.zip, check_sum: 1728f184c38306e86e2e4102f153008f3b38af5c98089324b0fa4921affa2c2e } 54 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check defined variables 2 | --- 3 | - name: ihs_repository_url should be defined 4 | assert: 5 | that: 6 | - ihs_repository_url is defined and ihs_repository_url != '' 7 | msg: "Set the value of 'ihs_repository_url' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Is IIM Installed? 3 | command: "egrep {{ __iim_product_id }} /var/ibm/InstallationManager/installed.xml" 4 | register: iim_already_installed 5 | 6 | - name: Is Product already Installed? 7 | command: "egrep {{ __product_id }} /var/ibm/InstallationManager/installed.xml" 8 | register: version_already_installed 9 | ignore_errors: true 10 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/tasks/install_ihs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }} state=absent 4 | ignore_errors: true 5 | 6 | #- debug: var=version_already_installed 7 | - name: Create Binaries directory 8 | file: path={{ __tmp_dir }} state=directory mode=0755 9 | 10 | - name: Create Logs directory 11 | file: path={{ __logs_dir }} state=directory mode=0755 12 | 13 | - name: Download IBM HTTP Server Files 14 | get_url: 15 | url: "{{ __repository_url }}/{{ item.file_name }}" 16 | dest: "{{ __tmp_dir }}/{{ item.file_name }}" 17 | mode: 0755 18 | checksum: sha256:{{ item.check_sum }} 19 | with_items: "{{ __this_files }}" 20 | 21 | - name: Extract IBM HTTP Server Files 22 | unarchive: 23 | src: "{{ __tmp_dir }}/{{ item.file_name }}" 24 | dest: "{{ __tmp_dir }}/" 25 | copy: no 26 | with_items: "{{ __this_files }}" 27 | 28 | - name: Generate Response file 29 | template: 30 | src: "{{ __tpl_file }}" 31 | dest: "{{ __rsp_file }}" 32 | 33 | - name: Install IBM HTTP Server Software 34 | command: 35 | chdir={{ __tmp_dir }} 36 | {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 37 | register: cout 38 | changed_when: ( cout.stdout.find(__version_check) != -1) 39 | 40 | #- debug: var=cout 41 | 42 | - name: Cleanup Binaries directory 43 | file: 44 | state: absent 45 | path: "{{ __tmp_dir }}" 46 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Setup Operating System 3 | include_tasks: setup_os.yml 4 | 5 | - name: Check Vars 6 | include_tasks: check_vars.yml 7 | 8 | - name: Define Vars 9 | include_tasks: define_vars.yml 10 | 11 | - name: Install IBM HTTP Server 12 | include_tasks: install_ihs.yml 13 | when: version_already_installed.rc != 0 14 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/tasks/setup_os.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: Install pre-requisites Apt 3 | # apt: 4 | # name: ['glibc.i686'] 5 | # state: present 6 | # when: ansible_os_family == "Debian" 7 | 8 | - name: Install pre-requisites Zypper 9 | zypper: 10 | name: ['glibc-32bit','libgcc_s1-32bit'] 11 | state: present 12 | when: ansible_os_family == "Suse" 13 | 14 | # java 32 bits for Toolbox/WCT 8.5 15 | - name: Install pre-requisites Yum 16 | yum: 17 | name: ['glibc.i686', 'libgcc.i686'] 18 | state: present 19 | when: 20 | - ansible_os_family == "RedHat" 21 | - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Amazon") 22 | 23 | #- name: Install pre-requisites Dnf 24 | # dnf: 25 | # name: ['unzip', 'tar', 'wget'] 26 | # state: present 27 | # when: 28 | # - ansible_os_family == "RedHat" 29 | # - (ansible_distribution != "CentOS" or ansible_distribution != "Amazon") 30 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/templates/ihs_plg_wct.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /roles/ibm-http-server-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __repository_url: "{{ ihs_repository_url }}" 3 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/wassup" 4 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 5 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 6 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 7 | __plg_install_location: "{{ plg_install_location | default('/opt/IBM/WebSphere/Plugins') }}" 8 | __wct_install_location: "{{ wct_install_location | default('/opt/IBM/WebSphere/Toolbox') }}" 9 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 10 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 11 | __rsp_file: "{{ __logs_dir }}/ihs_plg_wct.rsp" 12 | __log_file: "{{ __logs_dir }}/ihs_install.{{ __now }}.log" 13 | __tpl_file: "ihs_plg_wct.rsp.j2" 14 | __this_files: 15 | - { file_name: WAS_V8.5.5_SUPPL_1_OF_3.zip, check_sum: d63c59de4a5548e3d26e71fefb76193d41ac7585bc450c1e504287e0a6f746c9 } 16 | - { file_name: WAS_V8.5.5_SUPPL_2_OF_3.zip, check_sum: ac00e7ab43cc528fe7f3ccd69aeb6564a2e738e7bc6e30e71fd2e0d4bd64f39e } 17 | - { file_name: WAS_V8.5.5_SUPPL_3_OF_3.zip, check_sum: 94e3d9b70b139ad5fa0578da6857b295c5d2370c1b6ecb544c1e5757406fec90 } 18 | __this_version: "8.5.5000.20130514_1044" 19 | __product_id: "\"id='com.ibm.websphere.IHS.v85'\"" 20 | __version_check: "Installed com.ibm.websphere.IHS.v85_8.5.5000" 21 | 22 | __iim_product_id: "\"id='com.ibm.cic.agent\"" 23 | -------------------------------------------------------------------------------- /roles/ibm-http-server-restart/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is IHS Running?" 3 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/httpd.pid"` 4 | register: ihs_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop IHS" 8 | command: "{{ __ihs_install_location }}/bin/apachectl stop" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: ihs_is_running.rc == 0 12 | 13 | - name: Wait 10 seconds to start ihs 14 | pause: 15 | seconds: 10 16 | 17 | - name: "Is IHS Running?" 18 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/httpd.pid"` 19 | register: ihs_is_running 20 | ignore_errors: true 21 | 22 | - name: "Start IHS" 23 | command: "{{ __ihs_install_location }}/bin/apachectl start" 24 | register: ihs_start 25 | changed_when: ihs_start.rc == 0 26 | failed_when: ihs_start.rc != 0 27 | when: ihs_is_running.rc != 0 28 | 29 | - name: "Is IHS Running?" 30 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/httpd.pid"` 31 | register: ihs_is_running 32 | ignore_errors: true 33 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0)s 34 | 35 | - name: Wait 10 seconds for ihs to activate 36 | pause: 37 | seconds: 10 38 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 39 | -------------------------------------------------------------------------------- /roles/ibm-http-server-restart/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | -------------------------------------------------------------------------------- /roles/ibm-http-server-start/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is IHS Running?" 3 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/httpd.pid"` 4 | register: ihs_is_running 5 | ignore_errors: true 6 | 7 | - name: "Start IHS" 8 | command: "{{ __ihs_install_location }}/bin/apachectl start" 9 | register: ihs_start 10 | changed_when: ihs_start.rc == 0 11 | failed_when: ihs_start.rc != 0 12 | when: ihs_is_running.rc != 0 13 | 14 | - name: "Is IHS Running?" 15 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/httpd.pid"` 16 | register: ihs_is_running 17 | ignore_errors: true 18 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 19 | 20 | - name: Wait 10 seconds for ihs to activate 21 | pause: 22 | seconds: 10 23 | when: (ihs_start.rc is defined) and (ihs_start.rc == 0) 24 | -------------------------------------------------------------------------------- /roles/ibm-http-server-start/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | -------------------------------------------------------------------------------- /roles/ibm-http-server-stop/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is IHS Running?" 3 | shell: ps -p `cat "{{ __ihs_install_location }}/logs/httpd.pid"` 4 | register: ihs_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop IHS" 8 | command: "{{ __ihs_install_location }}/bin/apachectl stop" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: ihs_is_running.rc == 0 12 | -------------------------------------------------------------------------------- /roles/ibm-http-server-stop/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 3 | -------------------------------------------------------------------------------- /roles/installation-manager-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check_openshift.yml 2 | --- 3 | - name: iim_repository_url should be defined 4 | assert: 5 | that: 6 | - iim_repository_url is defined and iim_repository_url != '' 7 | msg: "Set the value of 'iim_repository_url' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/installation-manager-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Is Product already Installed? 3 | command: egrep {{ __this_version }} /var/ibm/InstallationManager/installed.xml 4 | register: version_already_installed 5 | ignore_errors: true 6 | -------------------------------------------------------------------------------- /roles/installation-manager-install/tasks/install_iim.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Create Binaries directory 3 | file: path={{ __tmp_dir }} state=directory mode=0755 4 | 5 | - name: Create Logs directory 6 | file: path={{ __logs_dir }} state=directory mode=0755 7 | 8 | - name: Download IBM Installation Manager 9 | get_url: 10 | url: "{{ iim_repository_url }}/{{ __bin_file }}" 11 | dest: "{{ __tmp_dir }}/{{ __bin_file }}" 12 | mode: 0755 13 | checksum: sha256:{{ __bin_file_sha256 }} 14 | 15 | - name: Extract IBM Installation Manager 16 | unarchive: 17 | src: "{{ __tmp_dir }}/{{ __bin_file }}" 18 | dest: "{{ __tmp_dir }}/" 19 | copy: no 20 | 21 | - name: Install/Update IBM Installation Manager 22 | command: 23 | chdir={{ __tmp_dir }} 24 | {{ __tmp_dir }}/tools/imcl install com.ibm.cic.agent -acceptLicense -installationDirectory {{ __iim_install_location }} -repositories {{ __tmp_dir }} -log {{ __logs_dir }}/iim_install.{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}.log 25 | register: cout 26 | changed_when: (cout.stdout.find('Installed com.ibm.cic.agent') != -1) or (cout.stdout.find('Updated to com.ibm.cic.agent') != -1) 27 | 28 | #- debug: msg={{ cout }} 29 | 30 | - name: Cleanup Binaries directory 31 | file: path={{ __tmp_dir }} state=absent 32 | -------------------------------------------------------------------------------- /roles/installation-manager-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_tasks: check_vars.yml 3 | 4 | - name: Setup Operating System 5 | include_tasks: setup_os.yml 6 | 7 | - name: Define Vars 8 | include_tasks: define_vars.yml 9 | 10 | - name: Install IBM Installation Manager 11 | include_tasks: install_iim.yml 12 | when: version_already_installed.rc != 0 13 | -------------------------------------------------------------------------------- /roles/installation-manager-install/tasks/setup_os.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install pre-requisites Apt 3 | apt: 4 | name: ['unzip', 'tar', 'wget'] 5 | state: present 6 | when: ansible_os_family == "Debian" 7 | 8 | - name: Install pre-requisites Zypper 9 | zypper: 10 | name: ['unzip', 'tar', 'wget','libgtk-2_0-0'] 11 | state: present 12 | when: ansible_os_family == "Suse" 13 | 14 | - name: Install pre-requisites Yum 15 | yum: 16 | name: ['unzip', 'tar', 'wget'] 17 | state: present 18 | when: 19 | - ansible_os_family == "RedHat" 20 | - (ansible_distribution == "RedHat" or ansible_distribution == "CentOS" or ansible_distribution == "Amazon") 21 | 22 | #- name: Install pre-requisites Dnf 23 | # dnf: 24 | # name: ['unzip', 'tar', 'wget'] 25 | # state: present 26 | # when: 27 | # - ansible_os_family == "RedHat" 28 | # - (ansible_distribution != "CentOS" or ansible_distribution != "Amazon") -------------------------------------------------------------------------------- /roles/installation-manager-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/iim" 3 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 4 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 5 | __bin_file: "{{ iim_bin_file | default('agent.installer.linux.gtk.x86_64_1.8.9001.20180709_1302.zip') }}" 6 | __bin_file_sha256: "{{ iim_bin_file_sha256 | default('238b13d73449402ff00f697062af80a299c6155c95c527f4ce67d0c1f266c911') }}" 7 | __this_version: "{{ iim_version | default('1.8.9001.20180709_1302') }}" 8 | __product_id: "\"id='com.ibm.cic.agent' version='{{ __this_version }}'\"" 9 | 10 | 11 | 12 | 13 | #__bin_file: "{{ iim_bin_file | default('agent.installer.linux.gtk.x86_64_1.8.7000.20170706_2137.zip') }}" 14 | #__bin_file_sha256: "{{ iim_bin_file_sha256 | default('0808503fae69956ffea5f8ca4d9f994111b35b0af1216fb5464f6483f8700c45') }}" 15 | #__this_version: "{{ iim_version | default('1.8.7000.20170706_2137') }}" 16 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check_openshift.yml 2 | --- 3 | - name: repository_url should be defined 4 | assert: 5 | that: 6 | - repository_url is defined and repository_url != '' 7 | msg: "Set the value of 'repository_url' in the inventory file." 8 | 9 | - name: ssc_hostname should be defined 10 | assert: 11 | that: 12 | - ssc_hostname is defined and ssc_hostname != '' 13 | msg: "Set the value of 'ssc_hostname' in the inventory file." 14 | 15 | - name: was_username should be defined 16 | assert: 17 | that: 18 | - was_username is defined and was_username != '' 19 | msg: "Set the value of 'was_username' in the inventory file." 20 | 21 | - name: was_password should be defined 22 | assert: 23 | that: 24 | - was_password is defined and was_password != '' 25 | msg: "Set the value of 'was_password' in the inventory file." 26 | 27 | - name: db_username should be defined 28 | assert: 29 | that: 30 | - db_username is defined and db_username != '' 31 | msg: "Set the value of 'db_username' in the inventory file." 32 | when: "'system-console' in group_names" 33 | 34 | - name: db_password should be defined 35 | assert: 36 | that: 37 | - db_password is defined and db_password != '' 38 | msg: "Set the value of 'db_password' in the inventory file." 39 | when: "'system-console' in group_names" 40 | 41 | - name: system_console_version should be defined 42 | assert: 43 | that: 44 | - system_console_version is defined and system_console_version != '' 45 | msg: "Set the value of 'system_console_version' in the inventory file." 46 | when: "'system-console' in group_names" 47 | 48 | - name: system_console_files should be defined 49 | assert: 50 | that: 51 | - system_console_files is defined and system_console_files != '' 52 | msg: "Set the value of 'system_console_files' in the inventory file." 53 | when: "'system-console' in group_names" 54 | 55 | - name: proxy_version should be defined 56 | assert: 57 | that: 58 | - proxy_version is defined and proxy_version != '' 59 | msg: "Set the value of 'proxy_version' in the inventory file." 60 | when: "'proxy_version-servers' in group_names" 61 | 62 | - name: proxy_version_files should be defined 63 | assert: 64 | that: 65 | - proxy_version_files is defined and proxy_version_files != '' 66 | msg: "Set the value of 'proxy_version_files' in the inventory file." 67 | when: "'proxy_version-servers' in group_names" 68 | 69 | - name: media_manager_version should be defined 70 | assert: 71 | that: 72 | - media_manager_version is defined and media_manager_version != '' 73 | msg: "Set the value of 'media_manager_version' in the inventory file." 74 | when: "'media-manager-servers' in group_names" 75 | 76 | - name: media_manager_files should be defined 77 | assert: 78 | that: 79 | - media_manager_files is defined and media_manager_files != '' 80 | msg: "Set the value of 'media_manager_files' in the inventory file." 81 | when: "'media-manager-servers' in group_names" 82 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Is Sametime Console? 3 | set_fact: 4 | __rsp_file: "{{ __logs_dir }}/install_stconsole.rsp" 5 | __log_file: "{{ __logs_dir }}/install_stconsole.{{ __now }}.log" 6 | __tpl_file: "install_stconsole.rsp.j2" 7 | __this_version: "{{ system_console_version }}" 8 | __this_files: "{{ system_console_files }}" 9 | __product_id: "\"id='com.ibm.lotus.sametime.systemconsoleserver' version='{{ system_console_version }}'\"" 10 | when: "'system-console' in group_names" 11 | 12 | - name: Is Sametime Proxy? 13 | set_fact: 14 | __rsp_file: "{{ __logs_dir }}/install_stproxy.rsp" 15 | __log_file: "{{ __logs_dir }}/install_stproxy.{{ __now }}.log" 16 | __tpl_file: "install_stproxy.rsp.j2" 17 | __this_version: "{{ proxy_version }}" 18 | __this_files: "{{ proxy_version_files }}" 19 | __product_id: "\"id='com.ibm.lotus.sametime.proxyserver' version='{{ proxy_version }}'\"" 20 | when: "'proxy-servers' in group_names" 21 | 22 | - name: Is Sametime Media Manager? 23 | set_fact: 24 | __rsp_file: "{{ __logs_dir }}/install_stmedia.rsp" 25 | __log_file: "{{ __logs_dir }}/install_stmedia.{{ __now }}.log" 26 | __tpl_file: "install_stmedia.rsp.j2" 27 | __this_version: "{{ media_manager_version }}" 28 | __this_files: "{{ media_manager_files }}" 29 | __product_id: "\"id='com.ibm.lotus.sametime.mediaserver' version='{{ media_manager_version }}'\"" 30 | when: "'media-manager-servers' in group_names" 31 | 32 | - debug: var=__this_version 33 | #__version_check: "Updated to com.ibm.websphere.ND.v85_{{ __this_version }}" 34 | 35 | - name: Is Product already Installed? 36 | command: "egrep {{ __product_id }} /var/ibm/InstallationManager/installed.xml" 37 | register: version_already_installed 38 | ignore_errors: true 39 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/tasks/install_sametime_was.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }} state=absent 4 | ignore_errors: true 5 | 6 | - name: Create Binaries directory 7 | file: path={{ __tmp_dir }} state=directory mode=0755 8 | 9 | - name: Create Logs directory 10 | file: path={{ __logs_dir }} state=directory mode=0755 11 | 12 | - name: Download Installer 13 | get_url: 14 | url: "{{ repository_url }}/{{ item.file_name }}" 15 | dest: "{{ __tmp_dir }}/{{ item.file_name }}" 16 | mode: 0755 17 | checksum: sha256:{{ item.check_sum }} 18 | with_items: "{{ __this_files }}" 19 | 20 | - name: Extract Installer 21 | unarchive: 22 | src: "{{ __tmp_dir }}/{{ item.file_name }}" 23 | dest: "{{ __tmp_dir }}/" 24 | copy: no 25 | with_items: "{{ __this_files }}" 26 | 27 | - name: Encode WAS Password 28 | command: "{{ __iim_install_location }}/eclipse/tools/imutilsc encryptString {{ was_password }}" 29 | register: __was_encoded_password 30 | changed_when: ( __was_encoded_password.rc == 0) 31 | 32 | - name: Encode DB Password 33 | command: "{{ __iim_install_location }}/eclipse/tools/imutilsc encryptString {{ db_password }}" 34 | register: __db_encoded_password 35 | changed_when: ( __db_encoded_password.rc == 0) 36 | when: ('system-console' in group_names) 37 | 38 | - name: Generate Response file 39 | template: 40 | src: "{{ __tpl_file }}" 41 | dest: "{{ __rsp_file }}" 42 | 43 | - name: Disable Repository on Installation Manager 44 | replace: 45 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 46 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 47 | replace: '\1RepositoryIsOpen=false\2' 48 | backup: yes 49 | ignore_errors: true 50 | 51 | - name: Create Sametime Temporary directory 52 | file: path={{ __sametime_tmp_dir }} state=directory mode=0755 53 | 54 | #- name: Install IBM Sametime Software 55 | # command: 56 | # chdir={{ __tmp_dir }} 57 | # {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 58 | # register: cout 59 | # changed_when: ( cout.stdout.find(__version_check) != -1) 60 | # 61 | ##- debug: var=cout 62 | # 63 | #- name: Cleanup Binaries directory 64 | # file: 65 | # state: absent 66 | # path: "{{ __tmp_dir }}" 67 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | #- name: show the groups the host(s) are in 3 | # debug: msg="{{group_names}}" 4 | - name: Check Vars 5 | include_tasks: check_vars.yml 6 | 7 | - name: Define Vars 8 | include_tasks: define_vars.yml 9 | 10 | - include_tasks: install_sametime_was.yml 11 | when: version_already_installed.rc != 0 12 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/templates/install_stconsole.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 24 | 25 | 26 | 33 | 34 | 35 | 41 | 42 | 43 | 44 | 45 | 46 | 50 | 51 | 52 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 84 | 85 | 86 | 89 | 94 | 95 | 96 | 101 | 102 | 103 | 115 | 116 | 117 | 118 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 138 | 139 | 140 | 141 | 146 | 147 | 148 | 152 | 153 | 154 | 155 | 156 | 157 | 166 | 167 | 168 | 169 | 173 | 174 | 175 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/templates/install_stmedia.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 28 | 29 | 30 | 38 | 39 | 40 | 45 | 46 | 47 | 54 | 55 | 56 | 57 | 61 | 62 | 63 | 67 | 68 | 69 | 79 | 80 | 81 | 82 | 84 | 85 | 86 | 90 | 91 | 92 | 96 | 97 | 98 | 102 | 103 | 104 | 105 | 114 | 115 | 116 | 117 | 118 | 119 | 123 | 124 | 125 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/templates/install_stproxy.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 28 | 29 | 30 | 38 | 39 | 40 | 45 | 46 | 47 | 54 | 55 | 56 | 60 | 61 | 62 | 66 | 67 | 68 | 72 | 73 | 74 | 84 | 85 | 86 | 87 | 89 | 90 | 91 | 95 | 96 | 97 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 117 | 118 | 119 | 120 | 121 | 125 | 126 | 127 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /roles/sametime-was-server-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/temp" 3 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 4 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 5 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 6 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | 9 | __sametime_install_location: "{{ sametime_install_location | default('/opt/IBM/SametimeServer') }}" 10 | __sametime_tmp_dir: "{{ sametime_tmp_dir | default('/opt/IBM/STTempDir') }}" 11 | __sametime_hostname: "{{ inventory_hostname_short }}" 12 | ## {{ ansible_hostname.split('.')[0] }}SSCNode 13 | 14 | 15 | # Must ben defined to work with set_fact 16 | #__this_version: "" 17 | #__this_files: "{{ was_fp_files | default( __was_fp_files_fp11 ) }}" 18 | #__version_check: "Updated to com.ibm.websphere.ND.v85_{{ __this_version }}" 19 | #__product_id: "\"id='com.ibm.websphere.ND.v85' version='{{ __this_version }}'\"" 20 | -------------------------------------------------------------------------------- /roles/was-backup-dir-pre-fixes-zip/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Backup directory 3 | file: path={{ __bkp_dir }} state=absent 4 | ignore_errors: true 5 | 6 | - name: Create Backup directory 7 | file: path={{item}} state=directory mode=0755 8 | with_items: 9 | - "{{ __bkp_dir }}" 10 | 11 | - name: Backup Directories 12 | archive: 13 | path: "{{item.dir}}" 14 | dest: "{{ __bkp_dir }}/{{item.zipfile}}" 15 | format: zip 16 | with_items: 17 | - { dir: "{{ __ibm_dir }}/InstallationManager", zipfile: "installation_manager.zip" } 18 | - { dir: "{{ __ibm_dir }}/IMShared", zipfile: "imshared.zip" } 19 | - { dir: "{{ __ibm_dir }}/WebSphere", zipfile: "websphere.zip" } 20 | - { dir: "/var/ibm", zipfile: "var_ibm.zip" } 21 | - { dir: "/etc/.ibm", zipfile: "etc_ibm.zip" } 22 | 23 | - name: Backup Connections Directories 24 | archive: 25 | path: "{{item.dir}}" 26 | dest: "{{ __bkp_dir }}/{{item.zipfile}}" 27 | format: zip 28 | with_items: 29 | - { dir: "{{ __ibm_dir }}/Connections", zipfile: "connections.zip" } 30 | ignore_errors: true 31 | 32 | - name: Backup Files 33 | command: cp {{item}} {{item}}_{{ __now }} 34 | with_items: 35 | - /var/ibm/InstallationManager/installed.xml 36 | - /var/ibm/InstallationManager/installRegistry.xml 37 | - /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 38 | register: cout 39 | 40 | - name: Disable Repository on Installation Manager 41 | replace: 42 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 43 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 44 | replace: '\1RepositoryIsOpen=false\2' 45 | backup: yes 46 | ignore_errors: true 47 | -------------------------------------------------------------------------------- /roles/was-backup-dir-pre-fixes-zip/vars/main.yml: -------------------------------------------------------------------------------- 1 | # Backup WAS before Fix 2 | # 3 | # How to run: 4 | # ansible-playbook -i hosts.connections -u -k ansible-ibm-websphere/playbooks/was-backup-dir-pre-fixes.yml 5 | --- 6 | __ibm_dir: "{{ ibm_dir | default('/opt/IBM') }}" 7 | __bkp_dir: "{{ bkp_dir | default('/opt/IBM/Backup') }}" 8 | __now_tmp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 9 | __now: "{{ __now_tmp }}" 10 | -------------------------------------------------------------------------------- /roles/was-backup-dir-pre-fixes/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Backup directory 3 | file: path={{ __bkp_dir }} state=absent 4 | ignore_errors: true 5 | 6 | - name: Create Backup directory 7 | file: path={{item}} state=directory mode=0755 8 | with_items: 9 | - "{{ __bkp_dir }}" 10 | # - "{{ __bkp_dir }}/InstallationManager" 11 | # - "{{ __bkp_dir }}/IMShared" 12 | # - "{{ __bkp_dir }}/WebSphere" 13 | # - "{{ __bkp_dir }}/var/ibm" 14 | # - "{{ __bkp_dir }}/etc/.ibm" 15 | # - "{{ __bkp_dir }}/Connections" 16 | 17 | - name: Backup Directories 18 | command: cp -R {{item}} {{ __bkp_dir }}/ 19 | register: cout 20 | with_items: 21 | - "{{ __ibm_dir }}/InstallationManager" 22 | - "{{ __ibm_dir }}/IMShared" 23 | - "{{ __ibm_dir }}/WebSphere" 24 | - "/var/ibm" 25 | - "/etc/.ibm" 26 | 27 | - name: Backup Connections Directories 28 | command: cp -R {{item}} {{ __bkp_dir }}/ 29 | register: cout 30 | with_items: 31 | - "{{ __ibm_dir }}/Connections" 32 | ignore_errors: true 33 | 34 | - name: Backup Files 35 | command: cp {{item}} {{item}}_{{ __now }} 36 | with_items: 37 | - /var/ibm/InstallationManager/installed.xml 38 | - /var/ibm/InstallationManager/installRegistry.xml 39 | - /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 40 | register: cout 41 | 42 | - name: Disable Repository on Installation Manager 43 | replace: 44 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 45 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 46 | replace: '\1RepositoryIsOpen=false\2' 47 | backup: yes 48 | ignore_errors: true 49 | -------------------------------------------------------------------------------- /roles/was-backup-dir-pre-fixes/vars/main.yml: -------------------------------------------------------------------------------- 1 | # Backup WAS before Fix 2 | # 3 | # How to run: 4 | # ansible-playbook -i hosts.connections -u -k ansible-ibm-websphere/playbooks/was-backup-dir-pre-fixes.yml 5 | --- 6 | __ibm_dir: "{{ ibm_dir | default('/opt/IBM') }}" 7 | __bkp_dir: "{{ bkp_dir | default('/opt/IBM/Backup') }}" 8 | __now_tmp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 9 | __now: "{{ __now_tmp }}" 10 | -------------------------------------------------------------------------------- /roles/was-config-systemd/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Set facts for dmgr 3 | set_fact: 4 | __profile_name: "Dmgr01" 5 | __svc_name: "dmgr" 6 | when: inventory_hostname in groups["dmgr"] 7 | 8 | - name: "Verifiy if Profile already exists" 9 | stat: 10 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 11 | register: profile_already_exists 12 | 13 | - name: "Generate Systemd" 14 | template: 15 | src: "{{ __svc_name }}.service.j2" 16 | dest: "/etc/systemd/system/{{ __svc_name }}.service" 17 | when: profile_already_exists.stat.exists == true 18 | 19 | - name: restart was daemon 20 | systemd: 21 | name: "{{ __svc_name }}" 22 | # state: restarted 23 | daemon_reload: yes 24 | enabled: yes 25 | when: profile_already_exists.stat.exists == true 26 | -------------------------------------------------------------------------------- /roles/was-config-systemd/templates/dmgr.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description="Deployment Manager" 3 | Requires=network.service 4 | After=network-online.target 5 | 6 | [Service] 7 | ExecStart={{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startManager.sh 8 | ExecStop={{ __was_install_location }}/profiles/{{ __profile_name }}/bin/stopManager.sh -username {{ __was_username }} -password {{ __was_password }} 9 | PIDFile={{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid 10 | Type=forking 11 | Restart=no 12 | TimeoutStartSec=6000 13 | TimemoutStopSec=600 14 | #LimitNOFILE=60000 15 | #LimitNPROC=12500 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /roles/was-config-systemd/templates/nodeagent.service.j2: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description="Node Agent" 3 | Requires=network.service 4 | After=network-online.target 5 | 6 | [Service] 7 | ExecStart={{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startNode.sh 8 | ExecStop={{ __was_install_location }}/profiles/{{ __profile_name }}/bin/stopNode.sh -username {{ __was_username }} -password {{ __was_password }} 9 | PIDFile={{ __was_install_location }}/profiles/{{ __profile_name }}/logs/nodeagent/nodeagent.pid 10 | Type=forking 11 | Restart=no 12 | TimeoutStartSec=6000 13 | TimeoutStopSec=600 14 | #LimitNOFILE=60000 15 | #LimitNPROC=12500 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /roles/was-config-systemd/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __svc_name: "nodeagent" 4 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 5 | __was_nodename: "{{ was_nodename | default( __default_nodename ) }}" 6 | __was_hostname: "{{ inventory_hostname }}" 7 | __was_username: "{{ was_username }}" 8 | __was_password: "{{ was_password }}" 9 | -------------------------------------------------------------------------------- /roles/was-dmgr-config-jvm/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Verifiy if JVM is already configured" 13 | stat: 14 | path: "{{ __success_file }}" 15 | register: jvm_already_configured 16 | when: profile_already_exists.stat.exists == true 17 | 18 | - name: "Generate Response file" 19 | template: 20 | src: "{{ __tpl_file }}" 21 | dest: "{{ __rsp_file }}" 22 | when: jvm_already_configured.stat.exists == false 23 | 24 | - name: "Configure JVM" 25 | command: 26 | chdir={{ __bin_dir }} 27 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} 28 | register: cout 29 | changed_when: cout.rc == 0 30 | when: jvm_already_configured.stat.exists == false 31 | 32 | - name: "Create was-dmgr-config-jvm.success file" 33 | file: 34 | path: "{{ __success_file }}" 35 | state: touch -------------------------------------------------------------------------------- /roles/was-dmgr-config-jvm/templates/was_config_dmgr_jvm.py.j2: -------------------------------------------------------------------------------- 1 | #Configure Applicaton Security 2 | AdminTask.setJVMProperties('[-nodeName {{ __was_nodename }} -serverName dmgr -verboseModeGarbageCollection true -initialHeapSize 2048 -maximumHeapSize 2048 -genericJvmArguments "-Duser.language=en -Duser.region=US"]') 3 | #Save and Synchronise 4 | AdminConfig.create('Property', '(cells/{{ __was_cellname }}/nodes/{{ __was_nodename }}/servers/dmgr|server.xml#JavaVirtualMachine_1)', '[[validationExpression ""] [name "java.net.preferIPv4Stack"] [description ""] [value "true"] [required "false"]]') 5 | AdminConfig.save() 6 | # End of File 7 | -------------------------------------------------------------------------------- /roles/was-dmgr-config-jvm/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __default_nodename: "{{ inventory_hostname_short }}-node" 5 | __was_nodename: "{{ was_nodename | default( __default_nodename ) }}" 6 | __was_cellname: "{{ was_cellname | default('ConnectionsCell') }}" 7 | __was_username: "{{ was_username }}" 8 | __was_password: "{{ was_password }}" 9 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 10 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 11 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 12 | __rsp_file: "{{ __bin_dir }}/was_config_dmgr_jvm.py" 13 | __tpl_file: "was_config_dmgr_jvm.py.j2" 14 | __success_file: "{{ __bin_dir }}/was-dmgr-config-jvm.success" -------------------------------------------------------------------------------- /roles/was-dmgr-config-ldap/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Verifiy if LDAP is already configured" 13 | stat: 14 | #path: "{{ __rsp_file }}" 15 | path: "{{ __success_file }}" 16 | register: ldap_already_configured 17 | when: profile_already_exists.stat.exists == true 18 | 19 | - name: "Generate Response file" 20 | template: 21 | src: "{{ __tpl_file }}" 22 | dest: "{{ __rsp_file }}" 23 | when: ldap_already_configured.stat.exists == false 24 | 25 | - name: "Configure LDAP" 26 | command: 27 | chdir={{ __bin_dir }} 28 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} 29 | register: cout 30 | changed_when: cout.rc == 0 31 | when: ldap_already_configured.stat.exists == false 32 | 33 | - name: "Create was-dmgr-config-ldap.success file" 34 | file: 35 | path: "{{ __success_file }}" 36 | state: touch -------------------------------------------------------------------------------- /roles/was-dmgr-config-ldap/templates/was_config_ldap.py.j2: -------------------------------------------------------------------------------- 1 | #Create LDAP Repository 2 | AdminTask.createIdMgrLDAPRepository('[-default true -id {{ ldap_repo }} -adapterClassName com.ibm.ws.wim.adapter.ldap.LdapAdapter -ldapServerType IDS -sslConfiguration -certificateMapMode exactdn -supportChangeLog none -certificateFilter -loginProperties uid]') 3 | #Add LDAP Server 4 | AdminTask.addIdMgrLDAPServer('[-id {{ ldap_repo }} -host {{ ldap_server }} -bindDN {{ ldap_bind_user }} -bindPassword {{ ldap_bind_pass }} -referal ignore -sslEnabled true -ldapServerType IDS -sslConfiguration -certificateMapMode exactdn -certificateFilter -authentication simple -port 636]') 5 | 6 | AdminTask.addIdMgrRepositoryBaseEntry('[-id {{ ldap_repo }} -name {{ ldap_realm }} -nameInRepository {{ ldap_realm }}]') 7 | AdminTask.addIdMgrRealmBaseEntry('[-name defaultWIMFileBasedRealm -baseEntry {{ ldap_realm }}]') 8 | 9 | #Tuning 10 | AdminTask.updateIdMgrLDAPRepository('[-id {{ ldap_repo }} -searchTimeLimit 30000 -searchCountLimit 100]') 11 | AdminTask.updateIdMgrLDAPServer('[-id {{ ldap_repo }} -host {{ ldap_server }} -connectTimeout 20]') 12 | AdminTask.updateIdMgrLDAPServer('[-id {{ ldap_repo }} -host {{ ldap_server }} -connectionPool true]') 13 | AdminTask.setIdMgrLDAPContextPool('[-id {{ ldap_repo }} -enabled true -initPoolSize 1 -maxPoolSize 20 -prefPoolSize 3 -poolTimeOut 120]') 14 | AdminTask.setIdMgrLDAPAttrCache('[-id {{ ldap_repo }} -enabled true -cacheSize 40000 -cacheDistPolicy none -cacheTimeOut 1200]') 15 | AdminTask.setIdMgrLDAPSearchResultCache('[-id {{ ldap_repo }} -enabled true -cacheSize 40000 -cacheDistPolicy none -cacheTimeOut 1200]') 16 | #Update Group objects for TDS 17 | AdminTask.updateIdMgrLDAPEntityType('[-id {{ ldap_repo }} -name Group -objectClasses groupOfUniqueNames -searchBases -searchFilter ]') 18 | AdminTask.addIdMgrLDAPGroupMemberAttr('[-id {{ ldap_repo }} -name uniquemember -objectClass groupOfUniqueNames -scope direct]') 19 | #Enable dynamic groups 20 | AdminTask.deleteIdMgrLDAPGroupMemberAttr('[-id {{ ldap_repo }} -name member]') 21 | AdminTask.setIdMgrLDAPGroupConfig('[-id {{ ldap_repo }} -name ibm-allGroups -scope direct]') 22 | 23 | AdminTask.updateIdMgrRealm(['-name defaultWIMFileBasedRealm -allowOperationIfReposDown true']) 24 | 25 | #Save and Synchronise 26 | AdminConfig.save() 27 | AdminNodeManagement.syncActiveNodes() 28 | # End of File 29 | -------------------------------------------------------------------------------- /roles/was-dmgr-config-ldap/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __default_nodename: "{{ inventory_hostname_short }}-node" 5 | __was_nodename: "{{ was_nodename | default( __default_nodename ) }}" 6 | __was_username: "{{ was_username }}" 7 | __was_password: "{{ was_password }}" 8 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 9 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 10 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 11 | __rsp_file: "{{ __bin_dir }}/was_config_ldap.py" 12 | __tpl_file: "was_config_ldap.py.j2" 13 | __success_file: "{{ __bin_dir }}/was-dmgr-config-ldap.success" 14 | -------------------------------------------------------------------------------- /roles/was-dmgr-config-webserver/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check defined variables 2 | --- 3 | - name: ihs_password should be defined 4 | assert: 5 | that: 6 | - ihs_password is defined and ihs_password != '' 7 | msg: "Set the value of 'ihs_password' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/was-dmgr-config-webserver/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: "Verifiy if Profile already exists" 6 | stat: 7 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 8 | register: profile_already_exists 9 | 10 | - name: Verify if pid file 11 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 12 | register: dmgr_is_running 13 | ignore_errors: true 14 | 15 | - name: "Add WebServer to DMGR" 16 | command: 17 | chdir={{ __bin_dir }} 18 | {{ __bin_dir }}/wsadmin.sh -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f \ 19 | {{ __was_install_location }}/bin/configureWebserverDefinition.jacl {{ item.split('.')[0] }} IHS {{ __ihs_install_location }} \ 20 | {{ __ihs_install_location }}/conf/httpd.conf 80 MAP_ALL {{ __plg_install_location }} unmanaged \ 21 | {{ item.split('.')[0] }}-node {{ item }} {{ __ihs_arch }} {{ __ihs_admin_port }} \ 22 | {{ __ihs_username }} {{ ihs_password }} 23 | register: cout 24 | changed_when: cout.rc == 0 25 | # when: dmgr_is_running.stat.exists == false 26 | loop: "{{ groups['ihs_servers'] }}" 27 | 28 | - name: "Create was-dmgr-config-webserver.success file" 29 | file: 30 | path: "{{ __success_file }}" 31 | state: touch 32 | 33 | #/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/wsadmin.sh -username wsadmin -password gecin22 \ 34 | # -f /opt/IBM/WebSphere/AppServer/bin/configureWebserverDefinition.jacl dxl1scb00107 IHS /opt/IBM/HTTPServer85 \ 35 | # /opt/IBM/HTTPServer85/conf/httpd.conf 80 MAP_ALL /opt/IBM/WebSphere/Plugins unmanaged \ 36 | # dxl1scb00107Node dxl1scb00107.company.com linux 8085 ihsadmin gecin22 37 | -------------------------------------------------------------------------------- /roles/was-dmgr-config-webserver/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __was_username: "{{ was_username }}" 5 | __was_password: "{{ was_password }}" 6 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 9 | 10 | __ihs_install_location: "{{ ihs_install_location | default('/opt/IBM/HTTPServer') }}" 11 | __plg_install_location: "{{ plg_install_location | default('/opt/IBM/WebSphere/Plugins') }}" 12 | 13 | __ihs_admin_port: "{{ ihs_admin_port | default('8085') }}" 14 | __ihs_username: "{{ ihs_username | default('ihsadmin') }}" 15 | __ihs_admins_group: "{{ ihs_admins_group | default('ihsadmins') }}" 16 | __ihs_arch: "{{ ihs_arch | default('linux') }}" 17 | 18 | __success_file: "{{ __bin_dir }}/was-dmgr-config-webserver.success" 19 | -------------------------------------------------------------------------------- /roles/was-dmgr-create-profile/tasks/create_profile.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Generate Response file" 3 | template: 4 | src: "{{ __tpl_file }}" 5 | dest: "{{ __rsp_file }}" 6 | 7 | - name: "Create Profile" 8 | command: "{{ __was_install_location }}/bin/manageprofiles.sh -response {{ __rsp_file }}" 9 | register: cout 10 | changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 11 | failed_when: ( cout.stdout.find('INSTCONFFAILED') != -1) 12 | -------------------------------------------------------------------------------- /roles/was-dmgr-create-profile/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr" 5 | register: profile_already_exists 6 | 7 | - name: "Create DMGR Profile" 8 | include_tasks: create_profile.yml 9 | when: profile_already_exists.stat.exists != true 10 | -------------------------------------------------------------------------------- /roles/was-dmgr-create-profile/templates/was_profile_dmgr.rsp.j2: -------------------------------------------------------------------------------- 1 | create 2 | profileName={{ __profile_name }} 3 | profilePath={{ __was_install_location }}/profiles/{{ __profile_name }} 4 | templatePath={{ __was_install_location }}/profileTemplates/management 5 | nodeName={{ __was_nodename }} 6 | cellName={{ __was_cellname }} 7 | hostName={{ __was_hostname }} 8 | enableAdminSecurity=true 9 | adminUserName={{ __was_username }} 10 | adminPassword={{ __was_password }} 11 | serverType=DEPLOYMENT_MANAGER 12 | isDefault 13 | personalCertValidityPeriod=15 14 | signingCertValidityPeriod=15 15 | -------------------------------------------------------------------------------- /roles/was-dmgr-create-profile/vars/main.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbook -i hosts.development -k ansible-ibm-websphere/playbooks/was-dmgr-create-profile.yml 4 | # 5 | --- 6 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 7 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 8 | __default_nodename: "{{ inventory_hostname_short }}-node" 9 | __was_nodename: "{{ was_nodename | default( __default_nodename ) }}" 10 | __was_cellname: "{{ was_cellname | default('ConnectionsCell') }}" 11 | __was_hostname: "{{ inventory_hostname }}" 12 | __was_username: "{{ was_username }}" 13 | __was_password: "{{ was_password }}" 14 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 15 | __logs_dir: "{{ __was_install_location }}/logs" 16 | __rsp_file: "{{ __logs_dir }}/was_profile_dmgr.rsp" 17 | __tpl_file: "was_profile_dmgr.rsp.j2" 18 | -------------------------------------------------------------------------------- /roles/was-dmgr-enable-app-sec/tasks/enable_app_sec.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Generate Response file" 3 | template: 4 | src: "{{ __tpl_file }}" 5 | dest: "{{ __rsp_file }}" 6 | 7 | - name: "Configure JVM" 8 | command: 9 | chdir={{ __bin_dir }} 10 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} 11 | register: cout 12 | changed_when: cout.rc == 0 13 | 14 | - name: "Create was-dmgr-enable-app-sec.success file" 15 | file: 16 | path: "{{ __success_file }}" 17 | state: touch -------------------------------------------------------------------------------- /roles/was-dmgr-enable-app-sec/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Verifiy if Application Security is already configured" 13 | stat: 14 | path: "{{ __success_file }}" 15 | register: app_sec_already_configured 16 | when: profile_already_exists.stat.exists == true 17 | 18 | - name: "Enable Application Security" 19 | include_tasks: enable_app_sec.yml 20 | when: app_sec_already_configured.stat.exists == false -------------------------------------------------------------------------------- /roles/was-dmgr-enable-app-sec/templates/was_config_dmgr_app_sec.py.j2: -------------------------------------------------------------------------------- 1 | #Configure Applicaton Security 2 | AdminTask.setGlobalSecurity ('[-enabled true]') 3 | params = [] 4 | params.append(["enabled", "true"]) 5 | #print "Enable application security." 6 | params.append( ["appEnabled", "true"] ) 7 | #params.append(["enforceJava2Security", "false"]) 8 | #userreg = AdminConfig.list('WIMUserRegistry') 9 | #params.append(["activeUserRegistry", userreg]) 10 | #ltpa = AdminConfig.list("LTPA") 11 | #params.append(["activeAuthMechanism", ltpa]) 12 | sec = AdminConfig.list("Security") 13 | AdminConfig.modify(sec, params) 14 | 15 | AdminConfig.save() 16 | # End of File 17 | -------------------------------------------------------------------------------- /roles/was-dmgr-enable-app-sec/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __default_nodename: "{{ inventory_hostname_short }}-node" 5 | __was_nodename: "{{ was_nodename | default( __default_nodename ) }}" 6 | __was_cellname: "{{ was_cellname | default('ConnectionsCell') }}" 7 | __was_username: "{{ was_username }}" 8 | __was_password: "{{ was_password }}" 9 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 10 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 11 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 12 | __rsp_file: "{{ __bin_dir }}/was_config_dmgr_app_sec.py" 13 | __tpl_file: "was_config_dmgr_app_sec.py.j2" 14 | __success_file: "{{ __bin_dir }}/was-dmgr-enable-app-sec.success" -------------------------------------------------------------------------------- /roles/was-dmgr-full-sync-nodes/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Generate Response file" 13 | template: 14 | src: "{{ __tpl_file }}" 15 | dest: "{{ __rsp_file }}" 16 | 17 | - name: "Full Synchronize with nodes" 18 | command: 19 | chdir={{ __bin_dir }} 20 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} {{ __cluster_name }} 21 | register: cout 22 | changed_when: cout.rc == 0 23 | #changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 24 | 25 | 26 | -------------------------------------------------------------------------------- /roles/was-dmgr-full-sync-nodes/templates/full_sync_nodes.py.j2: -------------------------------------------------------------------------------- 1 | # Start of File 2 | ###################################################################### 3 | # Sync all the nodes. 4 | ###################################################################### 5 | nodes = AdminConfig.list('Node') 6 | nodeList = nodes.splitlines() 7 | for node in nodeList: 8 | nodeName = AdminConfig.showAttribute(node, 'name') 9 | ###################################################################### 10 | # Set the variable for node synchronization. 11 | ###################################################################### 12 | sync = AdminControl.completeObjectName('type=NodeSync,node='+nodeName+',*') 13 | 14 | if sync == '' : 15 | continue 16 | 17 | ###################################################################### 18 | # Synchronize the node by issuing the following command: 19 | ###################################################################### 20 | AdminControl.invoke(sync,'sync') 21 | # End of File 22 | -------------------------------------------------------------------------------- /roles/was-dmgr-full-sync-nodes/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __was_username: "{{ was_username }}" 5 | __was_password: "{{ was_password }}" 6 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 9 | __rsp_file: "{{ __bin_dir }}/full_sync_nodes.py" 10 | __tpl_file: "full_sync_nodes.py.j2" 11 | -------------------------------------------------------------------------------- /roles/was-dmgr-import-tls-cert/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Verifiy if TLS is already configured" 13 | stat: 14 | path: "{{ __success_file }}" 15 | register: tls_already_configured 16 | when: profile_already_exists.stat.exists == true 17 | 18 | - name: "Generate Response file" 19 | template: 20 | src: "{{ __tpl_file }}" 21 | dest: "{{ __rsp_file }}" 22 | when: tls_already_configured.stat.exists == false 23 | 24 | - name: "Add TLS Signer Certificate for AD to Cell Default Trust Store" 25 | command: 26 | chdir={{ __bin_dir }} 27 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} 28 | register: cout 29 | changed_when: cout.rc == 0 30 | #changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 31 | when: tls_already_configured.stat.exists == false 32 | 33 | - name: "Create was-dmgr-import-tls-cert.success file" 34 | file: 35 | path: "{{ __success_file }}" 36 | state: touch 37 | 38 | -------------------------------------------------------------------------------- /roles/was-dmgr-import-tls-cert/templates/was_import_tls_cert.py.j2: -------------------------------------------------------------------------------- 1 | # Start of File 2 | cellID=AdminControl.getCell() 3 | #Add TLS Signer Certificate for AD to Cell Default Trust Store 4 | AdminTask.retrieveSignerFromPort('[-keyStoreName CellDefaultTrustStore -keyStoreScope (cell):'+cellID+' -host {{ ldap_server }} -port 636 -certificateAlias {{ ldap_alias }} -sslConfigName CellDefaultSSLSettings -sslConfigScopeName (cell):'+cellID+' ]') 5 | 6 | #Save and Synchronise 7 | AdminConfig.save() 8 | AdminNodeManagement.syncActiveNodes() 9 | # End of File 10 | -------------------------------------------------------------------------------- /roles/was-dmgr-import-tls-cert/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __was_username: "{{ was_username }}" 5 | __was_password: "{{ was_password }}" 6 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 9 | __rsp_file: "{{ __bin_dir }}/was_import_tls_cert.py" 10 | __tpl_file: "was_import_tls_cert.py.j2" 11 | __success_file: "{{ __bin_dir }}/was-dmgr-import-tls-cert.success" 12 | -------------------------------------------------------------------------------- /roles/was-dmgr-restart/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is dmgr Running?" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid'` > /dev/null" 4 | register: dmgr_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop Dmgr" 8 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/stopManager.sh -username {{ was_username }} -password {{ was_password }}" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: dmgr_is_running.rc == 0 12 | 13 | - name: Wait 10 seconds to start DMGR 14 | pause: 15 | seconds: 10 16 | 17 | - name: "Is dmgr Running?" 18 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid'` > /dev/null" 19 | register: dmgr_is_running 20 | ignore_errors: true 21 | 22 | - name: "Start Dmgr" 23 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startManager.sh" 24 | register: dmgr_start 25 | changed_when: dmgr_start.rc == 0 26 | failed_when: dmgr_start.rc != 0 27 | when: dmgr_is_running.rc != 0 28 | 29 | - name: "Is dmgr Running?" 30 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid'` > /dev/null" 31 | register: dmgr_is_running 32 | ignore_errors: true 33 | when: (dmgr_start.rc is defined) and (dmgr_start.rc == 0)s 34 | 35 | - name: Wait 60 seconds for DMGR to activate 36 | pause: 37 | seconds: 60 38 | when: (dmgr_start.rc is defined) and (dmgr_start.rc == 0) 39 | -------------------------------------------------------------------------------- /roles/was-dmgr-restart/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | -------------------------------------------------------------------------------- /roles/was-dmgr-start-cluster/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Generate Response file" 13 | template: 14 | src: "{{ __tpl_file }}" 15 | dest: "{{ __rsp_file }}" 16 | 17 | - name: "Add TLS Signer Certificate for AD to Cell Default Trust Store" 18 | command: 19 | chdir={{ __bin_dir }} 20 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} {{ __cluster_name }} 21 | register: cout 22 | changed_when: cout.rc == 0 23 | #changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 24 | 25 | 26 | -------------------------------------------------------------------------------- /roles/was-dmgr-start-cluster/templates/start_cluster.py.j2: -------------------------------------------------------------------------------- 1 | # Start of File 2 | cellName=AdminControl.getCell() 3 | for clusterName in sys.argv : 4 | 5 | ############################################################################## 6 | # Identify the ClusterMgr MBean and assign it to the clusterMgr variable. 7 | ############################################################################## 8 | clusterMgr = AdminControl.completeObjectName('cell='+cellName+',type=ClusterMgr,*') 9 | 10 | ############################################################################## 11 | # Refresh the list of clusters. 12 | ############################################################################## 13 | AdminControl.invoke(clusterMgr, 'retrieveClusters') 14 | 15 | ############################################################################## 16 | # Identify the Cluster MBean and assign it to the cluster variable. 17 | ############################################################################# 18 | cluster = AdminControl.completeObjectName('cell='+cellName+',type=Cluster,name='+clusterName+',*') 19 | 20 | if cluster == '': 21 | continue 22 | 23 | ############################################################################## 24 | # Stop cluster. 25 | ############################################################################# 26 | print "stopping cluster" + cluster 27 | AdminControl.invoke(cluster, 'start') 28 | print "finish." 29 | # End of File 30 | 31 | #### 32 | #import sys 33 | #import lcapp 34 | # 35 | #cell = lcapp.Cell() 36 | #for cname in sys.argv: 37 | # print "start cluster:", cname 38 | # for cluster in cell.clusters(cname): 39 | # cluster.start() 40 | -------------------------------------------------------------------------------- /roles/was-dmgr-start-cluster/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __was_username: "{{ was_username }}" 5 | __was_password: "{{ was_password }}" 6 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 9 | __rsp_file: "{{ __bin_dir }}/start_cluster.py" 10 | __tpl_file: "start_cluster.py.j2" 11 | 12 | __cluster_name: "" 13 | -------------------------------------------------------------------------------- /roles/was-dmgr-start/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is dmgr Running?" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid'` > /dev/null" 4 | register: dmgr_is_running 5 | ignore_errors: true 6 | 7 | - name: "Start Dmgr" 8 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startManager.sh" 9 | register: dmgr_start 10 | changed_when: dmgr_start.rc == 0 11 | failed_when: dmgr_start.rc != 0 12 | when: dmgr_is_running.rc != 0 13 | 14 | - name: "Is dmgr Running?" 15 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid'` > /dev/null" 16 | register: cout 17 | ignore_errors: true 18 | when: (dmgr_start.rc is defined) and (dmgr_start.rc == 0) 19 | 20 | - name: Wait 60 seconds for DMGR to activate 21 | pause: 22 | seconds: 60 23 | when: (dmgr_start.rc is defined) and (dmgr_start.rc == 0) 24 | -------------------------------------------------------------------------------- /roles/was-dmgr-start/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | -------------------------------------------------------------------------------- /roles/was-dmgr-stop-cluster/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}" 5 | register: profile_already_exists 6 | 7 | - name: Verify if pid file 8 | shell: ps -p `cat "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid"` 9 | register: dmgr_is_running 10 | ignore_errors: true 11 | 12 | - name: "Generate Response file" 13 | template: 14 | src: "{{ __tpl_file }}" 15 | dest: "{{ __rsp_file }}" 16 | 17 | - name: "Add TLS Signer Certificate for AD to Cell Default Trust Store" 18 | command: 19 | chdir={{ __bin_dir }} 20 | {{ __bin_dir }}/wsadmin.sh -lang jython -port {{ __dmgr_soap_port }} -username {{ __was_username }} -password {{ __was_password }} -f {{ __rsp_file }} {{ __cluster_name }} 21 | register: cout 22 | changed_when: cout.rc == 0 23 | #changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 24 | 25 | 26 | -------------------------------------------------------------------------------- /roles/was-dmgr-stop-cluster/templates/stop_cluster.py.j2: -------------------------------------------------------------------------------- 1 | # Start of File 2 | cellName=AdminControl.getCell() 3 | for clusterName in sys.argv : 4 | 5 | ############################################################################## 6 | # Identify the ClusterMgr MBean and assign it to the clusterMgr variable. 7 | ############################################################################## 8 | clusterMgr = AdminControl.completeObjectName('cell='+cellName+',type=ClusterMgr,*') 9 | 10 | ############################################################################## 11 | # Refresh the list of clusters. 12 | ############################################################################## 13 | AdminControl.invoke(clusterMgr, 'retrieveClusters') 14 | 15 | ############################################################################## 16 | # Identify the Cluster MBean and assign it to the cluster variable. 17 | ############################################################################# 18 | cluster = AdminControl.completeObjectName('cell='+cellName+',type=Cluster,name='+clusterName+',*') 19 | 20 | if cluster == '': 21 | continue 22 | 23 | ############################################################################## 24 | # Stop cluster. 25 | ############################################################################# 26 | print "stopping cluster" + cluster 27 | AdminControl.invoke(cluster, 'stop') 28 | print "finish." 29 | # End of File 30 | -------------------------------------------------------------------------------- /roles/was-dmgr-stop-cluster/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __was_username: "{{ was_username }}" 5 | __was_password: "{{ was_password }}" 6 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __bin_dir: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin" 9 | __rsp_file: "{{ __bin_dir }}/stop_cluster.py" 10 | __tpl_file: "stop_cluster.py.j2" 11 | 12 | __cluster_name: "" 13 | -------------------------------------------------------------------------------- /roles/was-dmgr-stop/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is dmgr Running?" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/dmgr/dmgr.pid'` > /dev/null" 4 | register: dmgr_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop Dmgr" 8 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/stopManager.sh -username {{ was_username }} -password {{ was_password }}" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: dmgr_is_running.rc == 0 12 | -------------------------------------------------------------------------------- /roles/was-dmgr-stop/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('Dmgr01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | -------------------------------------------------------------------------------- /roles/was-java-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check_openshift.yml 2 | --- 3 | - name: was_repository_url should be defined 4 | assert: 5 | that: 6 | - was_repository_url is defined and was_repository_url != '' 7 | msg: "Set the value of 'was_repository_url' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/was-java-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Is Product already Installed? 3 | command: egrep {{ __this_version }} /var/ibm/InstallationManager/installed.xml 4 | register: version_already_installed 5 | ignore_errors: true 6 | -------------------------------------------------------------------------------- /roles/was-java-install/tasks/install_java.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }} state=absent 4 | when: version_already_installed.rc != 0 5 | ignore_errors: true 6 | 7 | - name: Create Binaries directory 8 | file: path={{ __tmp_dir }} state=directory mode=0755 9 | when: version_already_installed.rc != 0 10 | 11 | - name: Create Logs directory 12 | file: path={{ __logs_dir }} state=directory mode=0755 13 | when: version_already_installed.rc != 0 14 | 15 | - name: Download WAS Java 16 | get_url: 17 | url: "{{ was_repository_url }}/{{ item.file_name }}" 18 | dest: "{{ __tmp_dir }}/{{ item.file_name }}" 19 | mode: 0755 20 | checksum: sha256:{{ item.check_sum }} 21 | with_items: "{{ __this_files }}" 22 | when: version_already_installed.rc != 0 23 | 24 | - name: Extract WAS Java 25 | unarchive: 26 | src: "{{ __tmp_dir }}/{{ item.file_name }}" 27 | dest: "{{ __tmp_dir }}/" 28 | copy: no 29 | with_items: "{{ __this_files }}" 30 | when: version_already_installed.rc != 0 31 | 32 | - name: Generate Response file 33 | template: 34 | src: "{{ __tpl_file }}" 35 | dest: "{{ __rsp_file }}" 36 | when: version_already_installed.rc != 0 37 | 38 | - name: Disable Repository on Installation Manager 39 | replace: 40 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 41 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 42 | replace: '\1RepositoryIsOpen=false\2' 43 | backup: yes 44 | ignore_errors: true 45 | 46 | - name: Install IBM WAS Java SDK 47 | command: 48 | chdir={{ __tmp_dir }} 49 | {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 50 | register: cout 51 | changed_when: ( cout.stdout.find(__version_check) != -1) 52 | when: version_already_installed.rc != 0 53 | 54 | #- debug: var=cout 55 | 56 | - name: Cleanup Binaries directory 57 | file: path={{ __tmp_dir }} state=absent 58 | when: version_already_installed.rc != 0 59 | -------------------------------------------------------------------------------- /roles/was-java-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: Define Vars 6 | include_tasks: define_vars.yml 7 | 8 | - name: Install Java 9 | include_tasks: install_java.yml 10 | when: version_already_installed.rc != 0 11 | -------------------------------------------------------------------------------- /roles/was-java-install/templates/was_java.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /roles/was-java-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/was_fixes" 3 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 4 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 5 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 6 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __rsp_file: "{{ __logs_dir }}/was_java.rsp" 9 | __log_file: "{{ __logs_dir }}/was_java_install.{{ __now }}.log" 10 | __tpl_file: "was_java.rsp.j2" 11 | 12 | __version_latest: "8.0.5017.20180726_2118" 13 | __files_latest: 14 | - { file_name: 8.0.5.17-WS-IBMWASJAVA-Linux.zip, check_sum: e8dfc4e9e4e502f8c94a6169f5c54d437d7faa8faa8c5741e09deac6be874b5b } 15 | 16 | __version_802: "8.0.2010.20160224_1829" 17 | __files_802: 18 | - { file_name: 8.0.2.10-WS-IBMWASJAVA-Linux.zip, check_sum: 7338d90d760596d95eb9622aa6a5ceb21c5604cece702abeeb8565c331f2aaa1 } 19 | 20 | __this_version: "{{ java_version | default( __version_latest ) }}" 21 | __this_files: "{{ java_files | default( __files_latest ) }}" 22 | __version_check: "Installed com.ibm.websphere.IBMJAVA.v80_{{ __this_version }}" 23 | -------------------------------------------------------------------------------- /roles/was-killall-java/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: KillAll Java 3 | command: "killall -9 java" 4 | ignore_errors: true -------------------------------------------------------------------------------- /roles/was-nd-fix-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check_vars.yml 2 | --- 3 | - name: was_fixes_repository_url should be defined 4 | assert: 5 | that: 6 | - was_fixes_repository_url is defined and was_fixes_repository_url != '' 7 | msg: "Set the value of 'was_fixes_repository_url' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/was-nd-fix-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Use Fix Pack 8.5.5.14? 3 | set_fact: 4 | __this_files: "{{ __was_fp_files_fp14 }}" 5 | __version_check: "Updated to com.ibm.websphere.ND.v85_{{ __this_version }}" 6 | __product_id: "\"id='com.ibm.websphere.ND.v85' version='{{ __this_version }}'\"" 7 | when: ( __this_version == __was_fp_version_fp14 ) 8 | 9 | - name: Use Fix Pack 8.5.5.12? 10 | set_fact: 11 | __this_files: "{{ __was_fp_files_fp12 }}" 12 | __version_check: "Updated to com.ibm.websphere.ND.v85_{{ __this_version }}" 13 | __product_id: "\"id='com.ibm.websphere.ND.v85' version='{{ __this_version }}'\"" 14 | when: ( __this_version == __was_fp_version_fp12 ) 15 | 16 | - name: Use Fix Pack 8.5.5.11? 17 | set_fact: 18 | __this_files: "{{ __was_fp_files_fp11 }}" 19 | __version_check: "Updated to com.ibm.websphere.ND.v85_{{ __this_version }}" 20 | __product_id: "\"id='com.ibm.websphere.ND.v85' version='{{ __this_version }}'\"" 21 | when: ( __this_version == __was_fp_version_fp11 ) 22 | 23 | - name: Use Fix Pack 8.5.5.9? 24 | set_fact: 25 | __this_files: "{{ __was_fp_files_fp9 }}" 26 | __version_check: "Updated to com.ibm.websphere.ND.v85_{{ __this_version }}" 27 | __product_id: "\"id='com.ibm.websphere.ND.v85' version='{{ __this_version }}'\"" 28 | when: ( __this_version == __was_fp_version_fp9 ) 29 | 30 | - name: Is IIM Installed? 31 | command: "egrep {{ __iim_product_id }} /var/ibm/InstallationManager/installed.xml" 32 | register: iim_already_installed 33 | 34 | - name: Is WAS ND Installed? 35 | command: "egrep {{ __was_product_id }} /var/ibm/InstallationManager/installed.xml" 36 | register: was_already_installed 37 | 38 | - name: Is Product already Installed? 39 | command: "egrep {{ __product_id }} /var/ibm/InstallationManager/installed.xml" 40 | register: version_already_installed 41 | ignore_errors: true 42 | -------------------------------------------------------------------------------- /roles/was-nd-fix-install/tasks/install_was_fixes.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }} state=absent 4 | when: version_already_installed.rc != 0 5 | ignore_errors: true 6 | 7 | - name: Create Binaries directory 8 | file: path={{ __tmp_dir }} state=directory mode=0755 9 | when: version_already_installed.rc != 0 10 | 11 | - name: Create Logs directory 12 | file: path={{ __logs_dir }} state=directory mode=0755 13 | when: version_already_installed.rc != 0 14 | 15 | - name: Download WAS Fixes 16 | get_url: 17 | url: "{{ was_fixes_repository_url }}/{{ item.file_name }}" 18 | dest: "{{ __tmp_dir }}/{{ item.file_name }}" 19 | mode: 0755 20 | checksum: sha256:{{ item.check_sum }} 21 | with_items: "{{ __this_files }}" 22 | when: version_already_installed.rc != 0 23 | 24 | - name: Extract WAS Fixes 25 | unarchive: 26 | src: "{{ __tmp_dir }}/{{ item.file_name }}" 27 | dest: "{{ __tmp_dir }}/" 28 | copy: no 29 | with_items: "{{ __this_files }}" 30 | when: version_already_installed.rc != 0 31 | 32 | - name: Generate WAS Response file 33 | template: 34 | src: "{{ __tpl_file }}" 35 | dest: "{{ __rsp_file }}" 36 | when: version_already_installed.rc != 0 37 | 38 | - name: Disable Repository on Installation Manager 39 | replace: 40 | path: /var/ibm/InstallationManager/.settings/com.ibm.cic.agent.core.prefs 41 | regexp: '(\s*)RepositoryIsOpen=true(\s*)' 42 | replace: '\1RepositoryIsOpen=false\2' 43 | backup: yes 44 | ignore_errors: true 45 | 46 | - name: Install IBM WAS ND Fixes Software 47 | command: 48 | chdir={{ __tmp_dir }} 49 | {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 50 | register: cout 51 | changed_when: ( cout.stdout.find(__version_check) != -1) 52 | when: version_already_installed.rc != 0 53 | 54 | #- debug: var=cout 55 | 56 | - name: Cleanup Binaries directory 57 | file: 58 | state: absent 59 | path: "{{ __tmp_dir }}" 60 | when: version_already_installed.rc != 0 61 | -------------------------------------------------------------------------------- /roles/was-nd-fix-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: Define Vars 6 | include_tasks: define_vars.yml 7 | 8 | - name: Install WebSphere Application Server - Fixes 9 | include_tasks: install_was_fixes.yml 10 | when: version_already_installed.rc != 0 11 | -------------------------------------------------------------------------------- /roles/was-nd-fix-install/templates/was_nd_fixes.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /roles/was-nd-fix-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/was_fixes" 3 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 4 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 5 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 6 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __rsp_file: "{{ __logs_dir }}/was_nd_fixes.rsp" 9 | __log_file: "{{ __logs_dir }}/was_nd_fixes_install.{{ __now }}.log" 10 | __tpl_file: "was_nd_fixes.rsp.j2" 11 | 12 | __was_fp_version_latest: "8.5.5017.20200205_1450" 13 | __was_fp_files_latest: 14 | - { file_name: 8.5.5-WS-WAS-FP017-part1.zip, check_sum: f86e59f659c5a67fac52bfd514277f3e22b06122fec7b9efc74ff576a37aa4a1 } 15 | - { file_name: 8.5.5-WS-WAS-FP017-part2.zip, check_sum: 9207f95e92a861a97b5a765e7da3bba9651a0f4b7ab9dab903152589ca15575b } 16 | - { file_name: 8.5.5-WS-WAS-FP017-part3.zip, check_sum: ef7521feec369122cecee153fdb4c55299cb0adc76a66415d0f8959431eb6adb } 17 | 18 | __this_version: "{{ was_fp_version | default( __was_fp_version_latest ) }}" 19 | __this_files: "{{ was_fp_files | default( __was_fp_files_latest ) }}" 20 | __version_check: "Updated to com.ibm.websphere.ND" 21 | __product_id: "\"id='com.ibm.websphere.ND.v85' version='{{ __this_version }}'\"" 22 | 23 | __iim_product_id: "\"id='com.ibm.cic.agent\"" 24 | __was_product_id: "\"id='com.ibm.websphere.ND.v85'\"" 25 | 26 | ## Old Versions 27 | __was_fp_version_fp17: "8.5.5017.20200205_1450" 28 | __was_fp_files_fp17: 29 | - { file_name: 8.5.5-WS-WAS-FP017-part1.zip, check_sum: f86e59f659c5a67fac52bfd514277f3e22b06122fec7b9efc74ff576a37aa4a1 } 30 | - { file_name: 8.5.5-WS-WAS-FP017-part2.zip, check_sum: 9207f95e92a861a97b5a765e7da3bba9651a0f4b7ab9dab903152589ca15575b } 31 | - { file_name: 8.5.5-WS-WAS-FP017-part3.zip, check_sum: ef7521feec369122cecee153fdb4c55299cb0adc76a66415d0f8959431eb6adb } 32 | 33 | __was_fp_version_fp16: "8.5.5016.20190801_0951" 34 | __was_fp_files_fp16: 35 | - { file_name: 8.5.5-WS-WAS-FP016-part1.zip, check_sum: ef3e69bbea33f9d14f7997babea01e02b892e9b94677537a1c138a481d9cc80b } 36 | - { file_name: 8.5.5-WS-WAS-FP016-part2.zip, check_sum: 5b7fc93373dfb0e3cfff7ac0e0aff296fbfc4b7e7121a55501b07c193b88d2b0 } 37 | - { file_name: 8.5.5-WS-WAS-FP016-part3.zip, check_sum: 3376fc6ee2e9c320cd99803fa87611424ab4316542bf4fddab60e805e4dd323a } 38 | 39 | __was_fp_version_fp15: "8.5.5015.20190128_1828" 40 | __was_fp_files_fp15: 41 | - { file_name: 8.5.5-WS-WAS-FP015-part1.zip, check_sum: 1449ad29cd12b320838569e4b25654f38ce8dc189aa6a58aa38c67cf46276855 } 42 | - { file_name: 8.5.5-WS-WAS-FP015-part2.zip, check_sum: dd2e04dfdecd5269aab8ab1d7330f248d376ab996290bd39ad28029f5c5755b5 } 43 | - { file_name: 8.5.5-WS-WAS-FP015-part3.zip, check_sum: 3376fc6ee2e9c320cd99803fa87611424ab4316542bf4fddab60e805e4dd323a } 44 | -------------------------------------------------------------------------------- /roles/was-nd-install/tasks/check_vars.yml: -------------------------------------------------------------------------------- 1 | # check_openshift.yml 2 | --- 3 | - name: was_repository_url should be defined 4 | assert: 5 | that: 6 | - was_repository_url is defined and was_repository_url != '' 7 | msg: "Set the value of 'was_repository_url' in the inventory file." 8 | -------------------------------------------------------------------------------- /roles/was-nd-install/tasks/define_vars.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Is IIM Installed? 3 | command: "egrep {{ __iim_product_id }} /var/ibm/InstallationManager/installed.xml" 4 | register: iim_already_installed 5 | 6 | - name: Is Product already Installed? 7 | command: "egrep {{ __product_id }} /var/ibm/InstallationManager/installed.xml" 8 | register: version_already_installed 9 | ignore_errors: true 10 | -------------------------------------------------------------------------------- /roles/was-nd-install/tasks/install_was.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Cleanup Binaries directory 3 | file: path={{ __tmp_dir }} state=absent 4 | ignore_errors: true 5 | 6 | #- debug: var=version_already_installed 7 | - name: Create Binaries directory 8 | file: path={{ __tmp_dir }} state=directory mode=0755 9 | 10 | - name: Create Logs directory 11 | file: path={{ __logs_dir }} state=directory mode=0755 12 | 13 | - name: Download WAS ND Binary Files 14 | get_url: 15 | url: "{{ was_repository_url }}/{{ item.file_name }}" 16 | dest: "{{ __tmp_dir }}/{{ item.file_name }}" 17 | mode: 0755 18 | checksum: sha256:{{ item.check_sum }} 19 | with_items: "{{ __was_files }}" 20 | 21 | - name: Extract WAS ND Binary Files 22 | unarchive: 23 | src: "{{ __tmp_dir }}/{{ item.file_name }}" 24 | dest: "{{ __tmp_dir }}/" 25 | copy: no 26 | with_items: "{{ __was_files }}" 27 | 28 | - name: Generate WAS Response file 29 | template: 30 | src: "{{ __tpl_file }}" 31 | dest: "{{ __rsp_file }}" 32 | 33 | - name: Install IBM WAS Software 34 | command: 35 | chdir={{ __tmp_dir }} 36 | {{ __iim_install_location }}/eclipse/tools/imcl -acceptLicense -sVP -log {{ __log_file }} input {{ __rsp_file }} 37 | register: cout 38 | changed_when: ( cout.stdout.find( __version_check ) != -1) 39 | 40 | - name: Cleanup Binaries directory 41 | file: path={{ __tmp_dir }} state=absent 42 | -------------------------------------------------------------------------------- /roles/was-nd-install/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Check Vars 3 | include_tasks: check_vars.yml 4 | 5 | - name: Define Vars 6 | include_tasks: define_vars.yml 7 | 8 | - name: Install WebSphere Application Server 9 | include_tasks: install_was.yml 10 | when: version_already_installed.rc != 0 11 | -------------------------------------------------------------------------------- /roles/was-nd-install/templates/was_nd.rsp.j2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /roles/was-nd-install/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __tmp_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/was" 3 | __logs_dir: "{{ tmp_dir | default('/opt/IBM/Binaries') }}/logs" 4 | __iim_install_location: "{{ iim_install_location | default('/opt/IBM/InstallationManager') }}" 5 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 6 | __imshared_location: "{{ imshared_location | default('/opt/IBM/IMShared') }}" 7 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 8 | __rsp_file: "{{ __logs_dir }}/was_nd.rsp" 9 | __log_file: "{{ __logs_dir }}/was_nd_install.{{ __now }}.log" 10 | __tpl_file: "was_nd.rsp.j2" 11 | __was_files: 12 | - { file_name: WAS_ND_V8.5.5_1_OF_3.zip, check_sum: b1333962ba4b25c8632c7e4c82b472350337e99febac8f70ffbd551ca3905e83 } 13 | - { file_name: WAS_ND_V8.5.5_2_OF_3.zip, check_sum: 440b7ed82089d43b1d45c1e908bf0a1951fed98f2542b6d37c8b5e7274c6b1c9 } 14 | - { file_name: WAS_ND_V8.5.5_3_OF_3.zip, check_sum: b73ae070656bed6399a113c2db9fb0abaf5505b0d41c564bf2a58ce0b1e0dcd2 } 15 | __this_version: "{{ was_version | default('8.5.5000.20130514_1044') }}" 16 | __product_id: "\"id='com.ibm.websphere.ND.v85'\"" 17 | __version_check: "Installed com.ibm.websphere.ND" 18 | __iim_product_id: "\"id='com.ibm.cic.agent\"" 19 | 20 | 21 | # Still need to work on this 22 | # "{{ compatibility_matrix[ was_version ].was.version }}" 23 | # --------------------------------------------------------------------------------------- 24 | compatibility_matrix: 25 | 9.0.5.0: 26 | was: 27 | profile_name: "IBM WebSphere Application Server V9.0" 28 | product_id: "com.ibm.websphere.ND.v90" 29 | version: "9.0.0.20160526_1854" 30 | version_check: "Installed com.ibm.websphere.ND" 31 | files: 32 | - { file_name: WAS_ND_V9.0.5_1_OF_3.zip, check_sum: } 33 | - { file_name: WAS_ND_V9.0.5_2_OF_3.zip, check_sum: } 34 | - { file_name: WAS_ND_V9.0.5_3_OF_3.zip, check_sum: } 35 | fp_version_check: "Updated to com.ibm.websphere.ND" 36 | fp15: 37 | version: "9.0.5015.20230321_2220" 38 | files: 39 | - { file_name: 9.0.5-WS-WAS-FP015.zip, check_sum: a0821b1d34d81b2ef2b54db466befe290599adce6a60fdb5ef27a9ab98542694 } 40 | 9.0.0.0: 41 | was: 42 | profile_name: "IBM WebSphere Application Server V9.0" 43 | product_id: "com.ibm.websphere.ND.v90" 44 | version: "9.0.0.20160526_1854" 45 | version_check: "Installed com.ibm.websphere.ND" 46 | files: 47 | - { file_name: was.repo.9000.base.zip, check_sum: abe69d48355ec71f2f6d855c289683c3590c48a39e3fb6a6fa1b4b69c7a9207e } 48 | fp5: 49 | version: "9.0.5.20170918_1844" 50 | files: 51 | - { file_name: 9.0.0-WS-WAS-FP005.zip, check_sum: b607e6b1553df6c9c937b8aedfc6c4d1192820f32a43f004da7b2b9ce2e41944 } 52 | 8.5.5.0: 53 | was: 54 | profile_name: "IBM WebSphere Application Server V8.5" 55 | product_id: "com.ibm.websphere.ND.v85" 56 | version: "8.5.5000.20130514_1044" 57 | version_check: "Installed com.ibm.websphere.ND" 58 | files: 59 | - { file_name: WAS_ND_V8.5.5_1_OF_3.zip, check_sum: b1333962ba4b25c8632c7e4c82b472350337e99febac8f70ffbd551ca3905e83 } 60 | - { file_name: WAS_ND_V8.5.5_2_OF_3.zip, check_sum: 440b7ed82089d43b1d45c1e908bf0a1951fed98f2542b6d37c8b5e7274c6b1c9 } 61 | - { file_name: WAS_ND_V8.5.5_3_OF_3.zip, check_sum: b73ae070656bed6399a113c2db9fb0abaf5505b0d41c564bf2a58ce0b1e0dcd2 } 62 | fp_version_check: "Updated to com.ibm.websphere.ND" 63 | fp17: 64 | version: "8.5.5017.20200205_1450" 65 | files: 66 | - { file_name: 8.5.5-WS-WAS-FP017-part1.zip, check_sum: f86e59f659c5a67fac52bfd514277f3e22b06122fec7b9efc74ff576a37aa4a1 } 67 | - { file_name: 8.5.5-WS-WAS-FP017-part2.zip, check_sum: 9207f95e92a861a97b5a765e7da3bba9651a0f4b7ab9dab903152589ca15575b } 68 | - { file_name: 8.5.5-WS-WAS-FP017-part3.zip, check_sum: ef7521feec369122cecee153fdb4c55299cb0adc76a66415d0f8959431eb6adb } 69 | ihs: 70 | profile_name: "IBM HTTP Server V8.5" 71 | product_id: "id='com.ibm.websphere.IHS.v85'" 72 | version_details: "8.5.5000.20130514_1044" 73 | version_check: "Installed com.ibm.websphere.IHS.v85_8.5.5000" 74 | wct_profile_name: "WebSphere Customization Toolbox V8.5" 75 | wct_profile_id: "com.ibm.websphere.WCT.v85" 76 | files : 77 | - { file_name: WAS_V8.5.5_SUPPL_1_OF_3.zip, check_sum: d63c59de4a5548e3d26e71fefb76193d41ac7585bc450c1e504287e0a6f746c9 } 78 | - { file_name: WAS_V8.5.5_SUPPL_2_OF_3.zip, check_sum: ac00e7ab43cc528fe7f3ccd69aeb6564a2e738e7bc6e30e71fd2e0d4bd64f39e } 79 | - { file_name: WAS_V8.5.5_SUPPL_3_OF_3.zip, check_sum: 94e3d9b70b139ad5fa0578da6857b295c5d2370c1b6ecb544c1e5757406fec90 } 80 | java: 81 | profile_name: "IBM WebSphere Application Server V8.5" 82 | profile_id: "com.ibm.websphere.IBMJAVA.v80" 83 | features="com.ibm.sdk.8" 84 | 8.0.5: 85 | version: "8.0.5017.20180726_2118" 86 | version_check: "Installed com.ibm.websphere.IBMJAVA.v80" 87 | files: 88 | - { file_name: 8.0.5.17-WS-IBMWASJAVA-Linux.zip, check_sum: e8dfc4e9e4e502f8c94a6169f5c54d437d7faa8faa8c5741e09deac6be874b5b } 89 | 8.0.2: 90 | version: "8.0.2010.20160224_1829" 91 | version_check: "Installed com.ibm.websphere.IBMJAVA.v80" 92 | files: 93 | - { file_name: 8.0.2.10-WS-IBMWASJAVA-Linux.zip, check_sum: 7338d90d760596d95eb9622aa6a5ceb21c5604cece702abeeb8565c331f2aaa1 } 94 | 95 | 96 | -------------------------------------------------------------------------------- /roles/was-nodeagent-start/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Is nodeagent Running?" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/nodeagent/nodeagent.pid'` > /dev/null" 4 | register: nodeagent_is_running 5 | ignore_errors: true 6 | 7 | - name: "Start nodeagent" 8 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startNode.sh" 9 | register: dmgr_start 10 | changed_when: dmgr_start.rc == 0 11 | failed_when: dmgr_start.rc != 0 12 | when: nodeagent_is_running.rc != 0 13 | 14 | - name: Wait 60 seconds for nodeagent to activate 15 | pause: 16 | seconds: 60 17 | when: (dmgr_start.rc is defined) and (dmgr_start.rc == 0) 18 | -------------------------------------------------------------------------------- /roles/was-nodeagent-start/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | -------------------------------------------------------------------------------- /roles/was-nodeagent-stop/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verify if pid file" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/nodeagent/nodeagent.pid'` > /dev/null" 4 | register: nodeagent_is_running 5 | ignore_errors: true 6 | 7 | - name: "Stop Node Agent" 8 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/stopNode.sh -username {{ was_username }} -password {{ was_password }}" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | #changed_when: ( start.stdout.find('open for e-business') != -1) 12 | when: nodeagent_is_running.rc == 0 13 | -------------------------------------------------------------------------------- /roles/was-nodeagent-stop/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | -------------------------------------------------------------------------------- /roles/was-profile-cleanup-logs/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Collect Files: SystemErr_*.log, SystemOut_*.log, trace_*.log, startServer.log, *.txt" 3 | find: 4 | paths: "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs" 5 | patterns: "SystemErr_*.log,SystemOut_*.log,trace_*.log,startServer.log,*.txt" 6 | recurse: yes 7 | register: files_to_delete 8 | 9 | - name: "Delete Files: SystemErr_*.log, SystemOut_*.log, trace_*.log, startServer.log, *.txt" 10 | file: 11 | path: "{{ item.path }}" #correction code 12 | state: absent 13 | with_items: "{{ files_to_delete.files }}" 14 | 15 | - name: "Collect Files: SystemOut.log,SystemErr.log,native_stdout.log,native_stderr.log,*_exception.log" 16 | find: 17 | paths: "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs" 18 | patterns: "SystemOut.log,SystemErr.log,native_stdout.log,native_stderr.log,*_exception.log" 19 | recurse: yes 20 | register: files_to_truncate 21 | 22 | - name: "Truncate Files: SystemOut.log,SystemErr.log,native_stdout.log,native_stderr.log,*_exception.log" 23 | shell: echo '' > "{{ item.path }}" 24 | with_items: "{{ files_to_truncate.files }}" 25 | -------------------------------------------------------------------------------- /roles/was-profile-cleanup-logs/vars/main.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-profile-cleanup-logs.yml 4 | # 5 | --- 6 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 7 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 8 | __was_install_location: "/opt/IBM/WebSphere/AppServer" 9 | -------------------------------------------------------------------------------- /roles/was-profile-cleanup-temps/tasks/main.yml: -------------------------------------------------------------------------------- 1 | # How to Run 2 | # 3 | # ansible-playbooks -i hosts.development -k ansible-ibm-websphere/playbooks/was-profile-cleanup-temps.yml 4 | # 5 | --- 6 | - name: "Verify if Java is Running" 7 | command: "ps aux" 8 | register: java_is_running 9 | 10 | - name: "Cleanup temp directories" 11 | file: 12 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}/{{ item }}" 13 | state: absent 14 | with_items: 15 | - temp 16 | - wstemp 17 | - config/temp 18 | - tranlog 19 | - logs 20 | when: (java_is_running.stdout.find(__was_install_location) == -1) 21 | -------------------------------------------------------------------------------- /roles/was-profile-cleanup-temps/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | #__was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __was_install_location: "/opt/IBM/WebSphere/AppServer" 5 | -------------------------------------------------------------------------------- /roles/was-profile-create/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verifiy if Profile already exists" 3 | stat: 4 | path: "{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/nodeagent" 5 | register: profile_already_exists 6 | 7 | - name: Is Standalone? 8 | set_fact: 9 | __tpl_file: "was_profile_node_unmanaged.rsp.j2" 10 | when: ( __is_standalone ) 11 | 12 | - name: "Generate Response file" 13 | template: 14 | src: "{{ __tpl_file }}" 15 | dest: "{{ __rsp_file }}" 16 | when: profile_already_exists.stat.exists != true 17 | 18 | - name: "Create Was Profile" 19 | command: "{{ __was_install_location }}/bin/manageprofiles.sh -response {{ __rsp_file }}" 20 | register: cout 21 | changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 22 | failed_when: ( cout.stdout.find('INSTCONFFAILED') != -1) 23 | when: profile_already_exists.stat.exists != true 24 | -------------------------------------------------------------------------------- /roles/was-profile-create/templates/was_profile_node_managed.rsp.j2: -------------------------------------------------------------------------------- 1 | create 2 | profileName={{ __profile_name }} 3 | profilePath={{ __was_install_location }}/profiles/{{ __profile_name }} 4 | templatePath={{ __was_install_location }}/profileTemplates/managed 5 | nodeName={{ __was_nodename }} 6 | hostName={{ __was_hostname }} 7 | dmgrHost={{ dmgr_hostname }} 8 | dmgrPort={{ __dmgr_soap_port }} 9 | dmgrAdminUserName={{ __was_username }} 10 | dmgrAdminPassword={{ __was_password }} 11 | personalCertValidityPeriod=15 12 | signingCertValidityPeriod=15 13 | -------------------------------------------------------------------------------- /roles/was-profile-create/templates/was_profile_node_unmanaged.rsp.j2: -------------------------------------------------------------------------------- 1 | create 2 | profileName={{ __profile_name }} 3 | profilePath={{ __was_install_location }}/profiles/{{ __profile_name }} 4 | templatePath={{ __was_install_location }}/profileTemplates/default 5 | nodeName={{ __was_nodename }} 6 | hostName={{ __was_hostname }} 7 | adminUserName={{ __was_username }} 8 | adminPassword={{ __was_password }} 9 | enableAdminSecurity=true 10 | personalCertValidityPeriod=15 11 | signingCertValidityPeriod=15 12 | serverName={{ __servername }} 13 | #serverName=febserver 14 | -------------------------------------------------------------------------------- /roles/was-profile-create/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __default_nodename: "{{ inventory_hostname_short }}-node" 5 | __was_nodename: "{{ was_nodename | default( __default_nodename ) }}" 6 | __was_hostname: "{{ inventory_hostname }}" 7 | __was_username: "{{ was_username }}" 8 | __was_password: "{{ was_password }}" 9 | __dmgr_soap_port: "{{ dmgr_soap_port | default('8879')}}" 10 | __now: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" 11 | __logs_dir: "{{ __was_install_location }}/logs" 12 | __rsp_file: "{{ __logs_dir }}/was_profile_node.rsp" 13 | __tpl_file: "was_profile_node_managed.rsp.j2" 14 | __is_standalone: "{{ is_standalone | default(false) }}" 15 | -------------------------------------------------------------------------------- /roles/was-profile-delete-all/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Delete WAS Profile" 3 | command: "{{ __was_install_location }}/bin/manageprofiles.sh -deleteAll" 4 | register: cout 5 | changed_when: ( cout.stdout.find('INSTCONFSUCCESS') != -1) 6 | 7 | - name: "Cleanup Profiles directories" 8 | file: 9 | path: "{{ __was_install_location }}/profiles" 10 | state: absent 11 | -------------------------------------------------------------------------------- /roles/was-profile-delete-all/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | -------------------------------------------------------------------------------- /roles/was-server-start/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verify if pid file" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/nodeagent/nodeagent.pid'` > /dev/null" 4 | register: nodeagent_is_running 5 | ignore_errors: true 6 | 7 | - name: "Start Node Agent" 8 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startNode.sh" 9 | register: cout 10 | changed_when: cout.rc == 0 11 | when: nodeagent_is_running.rc != 0 12 | 13 | - name: Wait 60 seconds for NODEAGENT to activate 14 | pause: 15 | seconds: 60 16 | when: nodeagent_is_running.rc != 0 17 | 18 | - name: "Verify if pid file" 19 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/{{ item }}/{{ item }}.pid'` > /dev/null" 20 | register: server_is_running 21 | ignore_errors: true 22 | with_items: "{{ __servers }}" 23 | 24 | #- debug: var=server_is_running 25 | - name: "Start Servers" 26 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/startServer.sh {{ item.item }}" 27 | register: cout 28 | changed_when: cout.rc == 0 29 | when: item.rc != 0 30 | with_items: "{{ server_is_running.results }}" 31 | 32 | - name: Wait 30 seconds for SERVER to activate 33 | pause: 34 | seconds: 30 35 | -------------------------------------------------------------------------------- /roles/was-server-start/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __servers: "{{ servers }}" 5 | -------------------------------------------------------------------------------- /roles/was-server-stop/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: "Verify if pid file" 3 | shell: "ps -p `cat '{{ __was_install_location }}/profiles/{{ __profile_name }}/logs/{{ item }}/{{ item }}.pid'` > /dev/null" 4 | register: server_is_running 5 | ignore_errors: true 6 | with_items: "{{ __servers }}" 7 | 8 | #- debug: var=server_is_running 9 | - name: "Stop Servers" 10 | command: "{{ __was_install_location }}/profiles/{{ __profile_name }}/bin/stopServer.sh {{ item.item }} -username {{ was_username }} -password {{ was_password }}" 11 | register: cout 12 | changed_when: cout.rc == 0 13 | when: item.rc == 0 14 | with_items: "{{ server_is_running.results }}" 15 | -------------------------------------------------------------------------------- /roles/was-server-stop/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | __profile_name: "{{ profile_name | default('AppSrv01') }}" 3 | __was_install_location: "{{ was_install_location | default('/opt/IBM/WebSphere/AppServer') }}" 4 | __servers: "{{ servers }}" 5 | --------------------------------------------------------------------------------