community.general.bower (8.5.0) — module

Manage bower packages with bower

Authors: Michael Warkentin (@mwarkentin)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manage bower packages with bower

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install "bootstrap" bower package.
  community.general.bower:
    name: bootstrap
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install "bootstrap" bower package on version 3.1.1.
  community.general.bower:
    name: bootstrap
    version: '3.1.1'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the "bootstrap" bower package.
  community.general.bower:
    name: bootstrap
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Install packages based on bower.json.
  community.general.bower:
    path: /app/location
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update packages based on bower.json to their latest version.
  community.general.bower:
    path: /app/location
    state: latest
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# install bower locally and run from there
- npm:
    path: /app/location
    name: bower
    global: false
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- community.general.bower:
    path: /app/location
    relative_execpath: node_modules/.bin

Inputs

    
name:
    description:
    - The name of a bower package to install
    type: str

path:
    description:
    - The base path where to install the bower packages
    required: true
    type: path

state:
    choices:
    - present
    - absent
    - latest
    default: present
    description:
    - The state of the bower package
    type: str

offline:
    default: false
    description:
    - Install packages from local cache, if the packages were installed before
    type: bool

version:
    description:
    - The version to be installed
    type: str

production:
    default: false
    description:
    - Install with --production flag
    type: bool

relative_execpath:
    description:
    - Relative path to bower executable from install path
    type: path