mist_keys - Manage ssh-keys from mist.io service

Author:Chris Loukas <commixon@gmail.com>

Synopsis

New in version 1.7.1.

By uploading your SSH keys to mist.io you can access all your machines through mist.io, have a shell prompt from your browser and even let mist.io take care of enabling monitoring to your machines. You also can have mist.io run commands to your machines during provisiong or after an alert is triggered. mist_email and mist_password can be skipped if ~/.mist config file is present. See mist.client documentation for config file http://mistclient.readthedocs.org/en/latest/cmd/cmd.html

Options

parameter required default choices comments
auto_generate no
    If True it will ask mist.io to randomly generate a key and save it to the added keys
    key no
      When adding a new key, you can provide a local key's path to add to mist.io
      local_save_path no ~/.ssh
        If save_locally, the local save path will be used to save the key
        mist_email no
          Email to login to the mist.io service
          mist_password no
            Password to login to the mist.io service
            mist_uri no https://mist.io
              Url of the mist.io service. By default https://mist.io. But if you have a custom installtion of mist.io you can provide the url here
              name no
                Name of the key to add or list
                save_locally no
                  If True the auto generated key will be saved locally
                  state no
                  • present
                  • absent
                  If provided it will instruct the module to tirgger keys actions, otherwise it will only list information

                  Note

                  Requires mist.client

                  Examples


                  - name: Add local key named my_key to mist.io
                    mist_keys:
                      mist_email: your@email.com
                      mist_password: yourpassword
                      name: myKey
                      state: present
                      key: /home/user/.ssh/my_key
                  
                  - name: Auto-generate key and save locally
                    mist_keys:
                      mist_email: your@email.com
                      mist_password: yourpassword
                      name: autoKey
                      state: present
                      auto_generate: true
                      save_locally: true
                      local_save_path: /path/to/save
                  
                  - name: Delete key named myKey
                    mist_keys:
                      mist_email: your@email.com
                      mist_password: yourpassword
                      name: myKey
                      state: absent
                  
                  - name: List info for key named myKey
                    mist_keys:
                      mist_email: your@email.com
                      mist_password: yourpassword
                      name: myKey
                    register: key