LoginSignup
0
0

More than 5 years have passed since last update.

ローカルで実行するansible-vaultのdecryptとencryptで楽をする

Last updated at Posted at 2016-11-04

ホームディレクトリに.vault_passwordとかのファイルを作成し、ansible-vaultのパスワードを入力する。

次に、以下のエイリアスを.bashrcあたりに追加し、bashを再読み込みする。

.bashrc
alias encrypt='ansible-vault encrypt --vault-password-file ~/.vault_password'
alias decrypt='ansible-vault decrypt --vault-password-file ~/.vault_password'

後は暗号化・復号対象ファイルを以下のように指定すると、パスワード入力無しで実行できる。

暗号化
encrypt repositories/sample/naisho.config

復号
decrypt repositories/sample/naisho.config
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0