ansible-galaxy 命令

  1. ansible-galaxy 管理 role 的輔助說明,ROLE_ACTION 列出的 [init|remove|... 是可用的子命令。
    ceuser@deyu:/ansible_pb$ ansible-galaxy role --help
    usage: ansible-galaxy role [-h] ROLE_ACTION ...
    
    positional arguments:
      ROLE_ACTION
        init       Initialize new role with the base structure of a role.
        remove     Delete roles from roles_path.
        delete     Removes the role from Galaxy. It does not remove or alter the
                   actual GitHub repository.
        list       Show the name and version of each role installed in the
                   roles_path.
        search     Search the Galaxy database by tags, platforms, author and
                   multiple keywords.
        import     Import a role into a galaxy server
        setup      Manage the integration between Galaxy and the given source.
        info       View more details about a specific role.
        install    Install role(s) from file(s), URL(s) or Ansible Galaxy
    
    optional arguments:
      -h, --help   show this help message and exit
    
  2. ansible-galaxy role 每個子命令都有輔助說明,例如以下查詢 search 的輔助說明。
    ceuser@deyu:/ansible_pb$ ansible-galaxy role search -h
    usage: ansible-galaxy role search [-h] [-s API_SERVER] [--token API_KEY] [-c]
                                      [-v] [--platforms PLATFORMS]
                                      [--galaxy-tags GALAXY_TAGS] [--author AUTHOR]
                                      [searchterm ...]
    
    positional arguments:
      searchterm            Search terms
    
    optional arguments:
      -h, --help            show this help message and exit
      -s API_SERVER, --server API_SERVER
                            The Galaxy API server URL
      --token API_KEY, --api-key API_KEY
                            The Ansible Galaxy API key which can be found at
                            https://galaxy.ansible.com/me/preferences.
      -c, --ignore-certs    Ignore SSL certificate validation errors.
      -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.
      --platforms PLATFORMS
                            list of OS platforms to filter by
      --galaxy-tags GALAXY_TAGS
                            list of galaxy tags to filter by
      --author AUTHOR       GitHub username