This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/csh | |
### Include SMF Library | |
. /lib/svc/share/smf_include.sh | |
switch ($argv[1]) | |
case 'start': | |
### Check exit status of FSC STATUS command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
set -xv | |
. /lib/svc/share/smf_include.sh | |
case "$1" in | |
'start') | |
# rotate jboss logs | |
mv /export/home/jboss/standalone/log/server.log /export/home/jboss/standalone/log/server.log_$(date +%Y%m%d-%H%M) | |
# start jboss | |
/export/home/jboss/bin/standalone.sh & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: cat fsc log and grep for 'successful' // register result | |
become: true | |
become_user: root | |
shell: |- | |
ps -ef | grep FSC | grep -v grep | |
register: did_fsc_start | |
tags: status | |
- name: fsc running? | |
fail: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Start Script | |
become: true | |
become_user: scriptuser | |
shell: |- | |
somescript.sh & | |
args: | |
executable: /usr/bin/csh | |
chdir: /export/home/scriptuser/bin | |
register: foo | |
until: foo.stdout is search ('started in') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Run the foo report | |
hosts: 10.1.1.20 | |
gather_facts: true | |
tasks: | |
- name: Register files in a folder | |
become: true | |
become_user: foo | |
find: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Get CSH ENV | |
hosts: 10.1.1.20 | |
gather_facts: true | |
tasks: | |
- name: gather env | |
become: true | |
become_user: mycshuser | |
shell: |- | |
env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Grab the latest report | |
hosts: 10.1.1.20 | |
gather_facts: true | |
tasks: | |
- name: Get files in a folder | |
become: true | |
become_user: report_user | |
find: | |
paths: "/export/home/report_user/jobs/app/reports/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Start testdev Teamcenter | |
hosts: 10.1.1.50 | |
tasks: | |
# Ensure all procs have been killed if they were running previously... | |
- name: kill all testdev and jboss procs | |
shell: |- | |
pkill -9 -u testdev && pkill -9 -u jboss | |
ignore_errors: True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Commands I use to add to git... | |
1992 git add . | |
1993 git commit -m "adding toarchdev-tc playbook" | |
1994 gupd | |
1995 gpush | |
# Aliases used... | |
zeedo@uzbook:~$ alias gupd | |
alias gupd='git_update' | |
zeedo@uzbook:~$ alias gpush |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Start Teamcenter | |
hosts: 192.168.131.65 | |
become: true | |
become_user: testdev | |
shell: | - | |
./tcdata/tc_cshvars | |
./ccbin/fsc.sh | |
args: | |
chdir: /export/home/testdev/ |
NewerOlder