July 2018
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories

WordPress Quotes

I've learned that you shouldn't go through life with a catcher's mitt on both hands; you need to be able to throw something back.
Maya Angelou

Recent Comments

July 2018
M T W T F S S
« Jun    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Short Cuts

2012 SERVER (64)
2016 windows (9)
AIX (13)
Amazon (30)
Ansibile (18)
Apache (125)
Asterisk (2)
cassandra (2)
Centos (208)
Centos RHEL 7 (254)
chef (3)
cloud (2)
cluster (3)
Coherence (1)
DB2 (5)
DISK (25)
DNS (9)
Docker (24)
Eassy (11)
EXCHANGE (3)
Fedora (6)
ftp (5)
GIT (3)
GOD (2)
Grub (1)
Hacking (10)
Hadoop (6)
horoscope (23)
Hyper-V (10)
IIS (15)
IPTABLES (15)
JAVA (6)
JBOSS (32)
jenkins (1)
Kubernetes (2)
Ldap (5)
Linux (189)
Linux Commands (167)
Load balancer (5)
mariadb (14)
Mongodb (4)
MQ Server (21)
MYSQL (82)
Nagios (5)
NaturalOil (13)
Nginx (29)
Ngix (1)
openldap (1)
Openstack (6)
Oracle (34)
Perl (3)
Postfix (19)
Postgresql (1)
PowerShell (2)
Python (3)
qmail (36)
Redis (12)
RHCE (28)
SCALEIO (1)
Security on Centos (29)
SFTP (1)
Shell (64)
Solaris (58)
Sql Server 2012 (4)
squid (3)
SSH (10)
SSL (14)
Storage (1)
swap (3)
TIPS on Linux (28)
tomcat (59)
Uncategorized (29)
Veritas (2)
vfabric (1)
VMware (28)
Weblogic (38)
Websphere (71)
Windows (19)
Windows Software (2)
wordpress (1)
ZIMBRA (17)

WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.

Who's Online

22 visitors online now
6 guests, 16 bots, 0 members

Hit Counter provided by dental implants orange county

ansible vault

root@controller ~]# ansible-vault create mohan.yml
Vault password:

[root@controller ~]# cat mohan.yml
$ANSIBLE_VAULT;1.1;AES256
38623235633039636166356162393064363936303461306536386237663032383932656164633131
6132633132376266313863366164396535386539666562310a306562383834343431633536353332
63303935623030393261373030343366323361653238306531356434333538613236303738653730
3935313536396361640a343836366434613638316538333165366161306166396564353635383831
30636536366462646362373432396234383432376437633764616239393938366137

[root@controller ~]# ansible-vault view mohan.yml
Vault password:
hai how are you

[root@controller ~]# ansible-vault edit mohan.yml
Vault password:

[root@controller ~]# ansible-vault rekey mohan.yml
Vault password:
New Vault password:
Confirm New Vault password:
Rekey successful

[root@controller ~]# ansible-playbook mohan.yml
ERROR! Decryption failed on /root/mohan.yml

[root@controller ~]# ansible-playbook –ask-vault-pass mohan.yml
Vault password:

[root@controller ~]# ansible-vault encrypt 4.yml
Vault password:
Encryption successful
[root@controller ~]# ansible-playbook 4.yml
ERROR! Decryption failed on /root/4.yml
[root@controller ~]# ansible-playbook –ask-vault-pass 4.yml
Vault password:

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
=======================================
[root@controller ~]# ansible-vault decrypt 4.yml
Vault password:
Decryption successful

[root@controller ~]# ansible-playbook 4.yml

PLAY [localhost] ***************************************************************

TASK [setup] *******************************************************************
ok: [localhost]

PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
========================================
[root@controller ~]# ansible-vault decrypt 4.yml –output=4-decrypted.yml
Vault password:
Decryption successful
[root@controller ~]# cat 4.yml
$ANSIBLE_VAULT;1.1;AES256
65386464336638663338363031383263633764393937633839366565336166303935363733616663
6636633734663766353365613063396565383662366539390a613765626239363361386165653763
35353730633164346634666339616232343830643434393563363662386633393830313538306130
3366386539313535380a643639613765653235363235383463663735663639333232353230343664
37346532353963663636303833653230333661333735393339336264303136636165366365326538
39613537353638373464333633353235356538653333643864623063333534303766373039373031
383436656161333330373162633966386639
[root@controller ~]# cat 4-decrypted.yml
– hosts: localhost
vars:
user: joe
home: /home/joe
=======================================
[root@controller ~]# vim vault-pass
redhat_123

[root@controller ~]# ansible-vault decrypt –vault-password-file=vault-pass sample.yaml

[root@controller ~]# ansible-vault create –vault-password-file=vault-pass example.yaml

– name: installing packages
hosts: localhost
tasks:
– yum: name=elinks state=latest

[root@controller ~]# cat example.yaml
$ANSIBLE_VAULT;1.1;AES256
37653137363538613630333039386164353232636333306430336333316164363566373464316634
3636336637336535633039323631313038643366393534650a393762643936343566313638646662
64663338376162643463343232396361383739303635383438323831386539303337623764316537
3961653566353362330a393530333638356663303264326331386166613330323539343436396632
38636630393133393064623437663133376233663934346666313162363838386532626337646134
39316561633530336663663238333766353861666339353134663930663839393532396334643062
64393233653834646463366432633965663432313431656236386664643461386365613363616432
35306537656335316561393966656362393634373237313737623164633836663561363636646332
32663839343461323832626263363762313730346333353034383539333332366463

[root@controller ~]# ansible-playbook example.yaml
ERROR! Decryption failed on /root/example.yaml

[root@controller ~]# ansible-playbook –vault-password-file=vault-pass –syntax-check example.yaml

playbook: example.yaml

[root@controller ~]# ansible-playbook –vault-password-file=vault-pass example.yaml

PLAY [installing packages] *****************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [yum] *********************************************************************
changed: [localhost]

PLAY RECAP *********************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0
=========================================

[root@controller ~]# vim newpassword
mohan0494

[root@controller ~]# ansible-vault rekey –new-vault-password-file=newpassword example.yaml
Vault password:
Rekey successful

[root@controller ~]# ansible-playbook –vault-password-file=newpassword example.yaml

PLAY [installing packages] *****************************************************

TASK [setup] *******************************************************************
ok: [localhost]

TASK [yum] *********************************************************************
ok: [localhost]

PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0

[root@controller ~]# ansible-vault decrypt –vault-password-file=newpassword example.yaml
Decryption successful
[root@controller ~]# cat example.yaml

– name: installing packages
hosts: localhost
tasks:
– yum: name=elinks state=latest

[root@controller ~]# ansible-vault encrypt –vault-password-file=newpassword example.yaml
Encryption successful
[root@controller ~]# cat example.yaml
$ANSIBLE_VAULT;1.1;AES256
64643166623463393937376165333034363635653931663839633836316239333035396161663165
6461613861373731383431303839383839316264366538350a373839396533633333313364626330
31336538356365666537373438306165333534363533636436636666656162346530643539316261
3431343233373135620a336163633164633961353339303433396639373735663038306262613639
65666130303539613131663666313361646538643038643834383966633364353162626233356132
64333930643531343066383164393238383639343764376661303734336532393431633534366238
62313537623834376535643830353361633336613563363535363931343934303739643039386532
62653335373632633465633063653564616430393234343862383437353732383231656138386165
38363135656434363239383065306136653863363334376230393739643539616463

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Blue Captcha Image
Refresh

*

Protected by WP Anti Spam