ansible-vault 命令

  1. ansible-vault 命令輔助說明,第一行列出的是所有可用的子命令。
    [deyu1@kvm19 ansible]$ ansible-vault --help
    usage: ansible-vault [-h] [--version] [-v]
                         {create,decrypt,edit,view,encrypt,encrypt_string,rekey}
                         ...
    
    encryption/decryption utility for Ansible data files
    
    positional arguments:
      {create,decrypt,edit,view,encrypt,encrypt_string,rekey}
        create              Create new vault encrypted file
        decrypt             Decrypt vault encrypted file
        edit                Edit vault encrypted file
        view                View vault encrypted file
        encrypt             Encrypt YAML file
        encrypt_string      Encrypt a string
        rekey               Re-key a vault encrypted file
    
    optional arguments:
      --version             show program's version number, config file location,
                            configured module search path, module location,
                            executable location and exit
      -h, --help            show this help message and exit
      -v, --verbose         Causes Ansible to print more debug messages. Adding
                            multiple -v will increase the verbosity, the builtin
                            plugins currently evaluate up to -vvvvvv. A reasonable
                            level to start is -vvv, connection debugging might
                            require -vvvv.
    
    See 'ansible-vault <command> --help' for more information on a specific
    command.