-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoracle-password-change.yaml
27 lines (21 loc) · 1.17 KB
/
oracle-password-change.yaml
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
- hosts: dbservers
become: yes
become_user: root
become_method: sudo
remote_user: sys-admin
# crypted passwords, generated on a Linux box using:
# echo 'import crypt,getpass; print crypt.crypt(getpass.getpass(), "$6$YOURSALT")' | python -
vars:
ora_pass_2: '$6$YOURSALT$Z.WZd6YP7WNq2IFPZdBFmZcqKWMUQqN2wNchgc/M/gJHTex8DoA1xSKT5mAkhlxPc8.JBoL/mqQvoRJipta.A.'
ora_pass_3: '$6$YOURSALT$1qZi8D5mykvt9Jxh8BKPur9LZZ1rNjLoZNa966YsmR7f..MzF1X02DhprqKmZhrmm8Bv8ermqdvx3I8lhtYAy.'
ora_pass_4: '$6$YOURSALT$whh.yrm9mCis8xAwUA1i3yUOFo9TpbSlkctZpKlrqbVQnCFB0qzYbIOQyFSk7E2piM/AG5HkFAjU6fiCC/tuo/'
tasks:
- name: Change Oracle user password of 10.0.10.2
action: user name=oracle update_password=always password="{{ora_pass_2}}"
when: inventory_hostname == "10.0.10.2"
- name: Change Oracle user password of 10.0.10.3
action: user name=oracle update_password=always password="{{ora_pass_3}}"
when: inventory_hostname == "10.0.10.3"
- name: Change Oracle user password of 10.0.10.4
action: user name=oracle update_password=always password="{{ora_pass_4}}"
when: inventory_hostname == "10.0.10.4"