- Docs »
- bower - Manage bower packages with bower
-
You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
bower - Manage bower packages with bower
- Manage bower packages with bower
Parameter |
Choices/Defaults |
Comments |
name
|
|
The name of a bower package to install
|
offline
bool |
|
Install packages from local cache, if the packages were installed before
|
path
required |
|
The base path where to install the bower packages
|
production
bool
(added in 2.0) |
|
Install with --production flag
|
relative_execpath
(added in 2.1) |
|
Relative path to bower executable from install path
|
state
|
Choices:
present ←
- absent
- latest
|
The state of the bower package
|
version
|
|
The version to be installed
|
- name: Install "bootstrap" bower package.
bower:
name: bootstrap
- name: Install "bootstrap" bower package on version 3.1.1.
bower:
name: bootstrap
version: '3.1.1'
- name: Remove the "bootstrap" bower package.
bower:
name: bootstrap
state: absent
- name: Install packages based on bower.json.
bower:
path: /app/location
- name: Update packages based on bower.json to their latest version.
bower:
path: /app/location
state: latest
# install bower locally and run from there
- npm:
path: /app/location
name: bower
global: no
- bower:
path: /app/location
relative_execpath: node_modules/.bin
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
- Michael Warkentin (@mwarkentin)
Hint
If you notice any issues in this documentation you can edit this document to improve it.