mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN * fix * fix * fix
This commit is contained in:
parent
8b92e0454d
commit
41cfdda6a3
533 changed files with 2130 additions and 2130 deletions
|
@ -48,25 +48,25 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install "bootstrap" bower package.
|
||||
bower:
|
||||
community.general.bower:
|
||||
name: bootstrap
|
||||
|
||||
- name: Install "bootstrap" bower package on version 3.1.1.
|
||||
bower:
|
||||
community.general.bower:
|
||||
name: bootstrap
|
||||
version: '3.1.1'
|
||||
|
||||
- name: Remove the "bootstrap" bower package.
|
||||
bower:
|
||||
community.general.bower:
|
||||
name: bootstrap
|
||||
state: absent
|
||||
|
||||
- name: Install packages based on bower.json.
|
||||
bower:
|
||||
community.general.bower:
|
||||
path: /app/location
|
||||
|
||||
- name: Update packages based on bower.json to their latest version.
|
||||
bower:
|
||||
community.general.bower:
|
||||
path: /app/location
|
||||
state: latest
|
||||
|
||||
|
@ -75,7 +75,7 @@ EXAMPLES = '''
|
|||
path: /app/location
|
||||
name: bower
|
||||
global: no
|
||||
- bower:
|
||||
- community.general.bower:
|
||||
path: /app/location
|
||||
relative_execpath: node_modules/.bin
|
||||
'''
|
||||
|
|
|
@ -84,27 +84,27 @@ author: "Tim Hoiberg (@thoiberg)"
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install gems from a Gemfile in the current directory
|
||||
bundler:
|
||||
community.general.bundler:
|
||||
state: present
|
||||
executable: ~/.rvm/gems/2.1.5/bin/bundle
|
||||
|
||||
- name: Exclude the production group from installing
|
||||
bundler:
|
||||
community.general.bundler:
|
||||
state: present
|
||||
exclude_groups: production
|
||||
|
||||
- name: Install gems into ./vendor/bundle
|
||||
bundler:
|
||||
community.general.bundler:
|
||||
state: present
|
||||
deployment_mode: yes
|
||||
|
||||
- name: Install gems using a Gemfile in another directory
|
||||
bundler:
|
||||
community.general.bundler:
|
||||
state: present
|
||||
gemfile: ../rails_project/Gemfile
|
||||
|
||||
- name: Update Gemfile in another directory
|
||||
bundler:
|
||||
community.general.bundler:
|
||||
state: latest
|
||||
chdir: ~/rails_project
|
||||
'''
|
||||
|
|
|
@ -112,25 +112,25 @@ notes:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Download and installs all libs and dependencies outlined in the /path/to/project/composer.lock
|
||||
composer:
|
||||
community.general.composer:
|
||||
command: install
|
||||
working_dir: /path/to/project
|
||||
|
||||
- name: Install a new package
|
||||
composer:
|
||||
community.general.composer:
|
||||
command: require
|
||||
arguments: my/package
|
||||
working_dir: /path/to/project
|
||||
|
||||
- name: Clone and install a project with all dependencies
|
||||
composer:
|
||||
community.general.composer:
|
||||
command: create-project
|
||||
arguments: package/package /path/to/project ~1.0
|
||||
working_dir: /path/to/project
|
||||
prefer_dist: yes
|
||||
|
||||
- name: Install a package globally
|
||||
composer:
|
||||
community.general.composer:
|
||||
command: require
|
||||
global_command: yes
|
||||
arguments: my/package
|
||||
|
|
|
@ -67,40 +67,40 @@ author: "Franck Cuny (@fcuny)"
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install Dancer perl package
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
|
||||
- name: Install version 0.99_05 of the Plack perl package
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: MIYAGAWA/Plack-0.99_05.tar.gz
|
||||
|
||||
- name: Install Dancer into the specified locallib
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
locallib: /srv/webapps/my_app/extlib
|
||||
|
||||
- name: Install perl dependencies from local directory
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
from_path: /srv/webapps/my_app/src/
|
||||
|
||||
- name: Install Dancer perl package without running the unit tests in indicated locallib
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
notest: True
|
||||
locallib: /srv/webapps/my_app/extlib
|
||||
|
||||
- name: Install Dancer perl package from a specific mirror
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
mirror: 'http://cpan.cpantesters.org/'
|
||||
|
||||
- name: Install Dancer perl package into the system root path
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
system_lib: yes
|
||||
|
||||
- name: Install Dancer if it is not already installed OR the installed version is older than version 1.0
|
||||
cpanm:
|
||||
community.general.cpanm:
|
||||
name: Dancer
|
||||
version: '1.0'
|
||||
'''
|
||||
|
|
|
@ -62,12 +62,12 @@ author: "Matt Wright (@mattupstate)"
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install or update pip
|
||||
easy_install:
|
||||
community.general.easy_install:
|
||||
name: pip
|
||||
state: latest
|
||||
|
||||
- name: Install Bottle into the specified virtualenv
|
||||
easy_install:
|
||||
community.general.easy_install:
|
||||
name: bottle
|
||||
virtualenv: /webapps/myapp/venv
|
||||
'''
|
||||
|
|
|
@ -95,18 +95,18 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install version 1.0 of vagrant
|
||||
gem:
|
||||
community.general.gem:
|
||||
name: vagrant
|
||||
version: 1.0
|
||||
state: present
|
||||
|
||||
- name: Install latest available version of rake
|
||||
gem:
|
||||
community.general.gem:
|
||||
name: rake
|
||||
state: latest
|
||||
|
||||
- name: Install rake version 1.0 from a local gem on disk
|
||||
gem:
|
||||
community.general.gem:
|
||||
name: rake
|
||||
gem_source: /path/to/gems/rake-1.0.gem
|
||||
state: present
|
||||
|
|
|
@ -122,20 +122,20 @@ extends_documentation_fragment:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Download the latest version of the JUnit framework artifact from Maven Central
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
dest: /tmp/junit-latest.jar
|
||||
|
||||
- name: Download JUnit 4.11 from Maven Central
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
version: 4.11
|
||||
dest: /tmp/junit-4.11.jar
|
||||
|
||||
- name: Download an artifact from a private repository requiring authentication
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
group_id: com.company
|
||||
artifact_id: library-name
|
||||
repository_url: 'https://repo.company.com/maven'
|
||||
|
@ -144,7 +144,7 @@ EXAMPLES = '''
|
|||
dest: /tmp/library-name-latest.jar
|
||||
|
||||
- name: Download a WAR File to the Tomcat webapps directory to be deployed
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
group_id: com.company
|
||||
artifact_id: web-app
|
||||
extension: war
|
||||
|
@ -152,7 +152,7 @@ EXAMPLES = '''
|
|||
dest: /var/lib/tomcat7/webapps/web-app.war
|
||||
|
||||
- name: Keep a downloaded artifact's name, i.e. retain the version
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
version: latest
|
||||
artifact_id: spring-core
|
||||
group_id: org.springframework
|
||||
|
@ -160,14 +160,14 @@ EXAMPLES = '''
|
|||
keep_name: yes
|
||||
|
||||
- name: Download the latest version of the JUnit framework artifact from Maven local
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
dest: /tmp/junit-latest.jar
|
||||
repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository"
|
||||
|
||||
- name: Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central
|
||||
maven_artifact:
|
||||
community.general.maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
version_by_spec: "[3.8,4.0)"
|
||||
|
|
|
@ -82,43 +82,43 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install "coffee-script" node.js package.
|
||||
npm:
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
path: /app/location
|
||||
|
||||
- name: Install "coffee-script" node.js package on version 1.6.1.
|
||||
npm:
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
version: '1.6.1'
|
||||
path: /app/location
|
||||
|
||||
- name: Install "coffee-script" node.js package globally.
|
||||
npm:
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
global: yes
|
||||
|
||||
- name: Remove the globally package "coffee-script".
|
||||
npm:
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
global: yes
|
||||
state: absent
|
||||
|
||||
- name: Install "coffee-script" node.js package from custom registry.
|
||||
npm:
|
||||
community.general.npm:
|
||||
name: coffee-script
|
||||
registry: 'http://registry.mysite.com'
|
||||
|
||||
- name: Install packages based on package.json.
|
||||
npm:
|
||||
community.general.npm:
|
||||
path: /app/location
|
||||
|
||||
- name: Update packages based on package.json to their latest version.
|
||||
npm:
|
||||
community.general.npm:
|
||||
path: /app/location
|
||||
state: latest
|
||||
|
||||
- name: Install packages based on package.json using the npm installed with nvm v0.10.1.
|
||||
npm:
|
||||
community.general.npm:
|
||||
path: /app/location
|
||||
executable: /opt/nvm/v0.10.1/bin/npm
|
||||
state: present
|
||||
|
|
|
@ -50,24 +50,24 @@ options:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Install pear package
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: Net_URL2
|
||||
state: present
|
||||
|
||||
- name: Install pecl package
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: pecl/json_post
|
||||
state: present
|
||||
|
||||
- name: Install pecl package with expected prompt
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: pecl/apcu
|
||||
state: present
|
||||
prompts:
|
||||
- (.*)Enable internal debugging in APCu \[no\]
|
||||
|
||||
- name: Install pecl package with expected prompt and an answer
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: pecl/apcu
|
||||
state: present
|
||||
prompts:
|
||||
|
@ -77,7 +77,7 @@ EXAMPLES = r'''
|
|||
Prompts will be processed on the same order as the packages order.
|
||||
If there is more prompts than packages, packages without prompts will be installed without any prompt expected.
|
||||
If there is more packages than prompts, additionnal prompts will be ignored.
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: pecl/gnupg, pecl/apcu
|
||||
state: present
|
||||
prompts:
|
||||
|
@ -88,7 +88,7 @@ EXAMPLES = r'''
|
|||
Prompts will be processed on the same order as the packages order.
|
||||
If there is more prompts than packages, packages without prompts will be installed without any prompt expected.
|
||||
If there is more packages than prompts, additionnal prompts will be ignored.
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: pecl/gnupg, pecl/apcu
|
||||
state: present
|
||||
prompts:
|
||||
|
@ -96,12 +96,12 @@ EXAMPLES = r'''
|
|||
- (.*)Enable internal debugging in APCu \[no\]: "yes"
|
||||
|
||||
- name: Upgrade package
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: Net_URL2
|
||||
state: latest
|
||||
|
||||
- name: Remove packages
|
||||
pear:
|
||||
community.general.pear:
|
||||
name: Net_URL2,pecl/json_post
|
||||
state: absent
|
||||
'''
|
||||
|
|
|
@ -30,14 +30,14 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Just get the list from default pip
|
||||
pip_package_info:
|
||||
community.general.pip_package_info:
|
||||
|
||||
- name: Get the facts for default pip, pip2 and pip3.6
|
||||
pip_package_info:
|
||||
community.general.pip_package_info:
|
||||
clients: ['pip', 'pip2', 'pip3.6']
|
||||
|
||||
- name: Get from specific paths (virtualenvs?)
|
||||
pip_package_info:
|
||||
community.general.pip_package_info:
|
||||
clients: '/home/me/projec42/python/pip3.5'
|
||||
'''
|
||||
|
||||
|
|
|
@ -76,38 +76,38 @@ requirements:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Install "imagemin" node.js package.
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
path: /app/location
|
||||
|
||||
- name: Install "imagemin" node.js package on version 5.3.1
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
version: '5.3.1'
|
||||
path: /app/location
|
||||
|
||||
- name: Install "imagemin" node.js package globally.
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
global: yes
|
||||
|
||||
- name: Remove the globally-installed package "imagemin".
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
global: yes
|
||||
state: absent
|
||||
|
||||
- name: Install "imagemin" node.js package from custom registry.
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
name: imagemin
|
||||
registry: 'http://registry.mysite.com'
|
||||
|
||||
- name: Install packages based on package.json.
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
path: /app/location
|
||||
|
||||
- name: Update all packages in package.json to their latest version.
|
||||
yarn:
|
||||
community.general.yarn:
|
||||
path: /app/location
|
||||
state: latest
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue