Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
pycklets / resources / frecklet / ssh-key-exists.frecklet
Size: Mime:
doc:
  short_help: Ensures an ssh key exists for a user.
  help: |
    Ensures an ssh key exists for a user.

    Creates one with empty password if necessary.

    TODO: suppor an (optional) password

args:
  user:
    doc:
      short_help: The name of the user.
    type: string
    required: false
  path_to_key:
    doc:
      short_help: The path to the ssh key.
    type: string
    required: true

frecklets:
- parent-folder-exists:
    path: '{{:: path_to_key ::}}'
    owner: '{{:: user ::}}'
- frecklet:
    name: command
    type: ansible-module
    desc:
      short: 'create ssh key (if necessary): {{:: path_to_key ::}}'
  task:
    become: '{{:: user | false_if_empty ::}}'
    become_user: '{{:: user ::}}'
  vars:
    free_form: 'ssh-keygen -q -t rsa -f {{:: path_to_key ::}} -C "" -N ""'
    creates: '{{:: path_to_key ::}}'
meta: {}