mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-09 14:50:02 -07:00
Fix Ansible documentation in part of example formatting (#334)
This commit is contained in:
parent
58ed77e851
commit
983d937b7b
58 changed files with 376 additions and 353 deletions
|
@ -83,28 +83,28 @@ author: "Tim Hoiberg (@thoiberg)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Installs gems from a Gemfile in the current directory
|
||||
- bundler:
|
||||
- name: Install gems from a Gemfile in the current directory
|
||||
bundler:
|
||||
state: present
|
||||
executable: ~/.rvm/gems/2.1.5/bin/bundle
|
||||
|
||||
# Excludes the production group from installing
|
||||
- bundler:
|
||||
- name: Exclude the production group from installing
|
||||
bundler:
|
||||
state: present
|
||||
exclude_groups: production
|
||||
|
||||
# Install gems into ./vendor/bundle
|
||||
- bundler:
|
||||
- name: Install gems into ./vendor/bundle
|
||||
bundler:
|
||||
state: present
|
||||
deployment_mode: yes
|
||||
|
||||
# Installs gems using a Gemfile in another directory
|
||||
- bundler:
|
||||
- name: Install gems using a Gemfile in another directory
|
||||
bundler:
|
||||
state: present
|
||||
gemfile: ../rails_project/Gemfile
|
||||
|
||||
# Updates Gemfile in another directory
|
||||
- bundler:
|
||||
- name: Update Gemfile in another directory
|
||||
bundler:
|
||||
state: latest
|
||||
chdir: ~/rails_project
|
||||
'''
|
||||
|
|
|
@ -111,25 +111,26 @@ notes:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Downloads and installs all the libs and dependencies outlined in the /path/to/project/composer.lock
|
||||
- composer:
|
||||
- name: Download and installs all libs and dependencies outlined in the /path/to/project/composer.lock
|
||||
composer:
|
||||
command: install
|
||||
working_dir: /path/to/project
|
||||
|
||||
- composer:
|
||||
- name: install a new package
|
||||
composer:
|
||||
command: require
|
||||
arguments: my/package
|
||||
working_dir: /path/to/project
|
||||
|
||||
# Clone project and install with all dependencies
|
||||
- composer:
|
||||
- name: Clone and install a project with all dependencies
|
||||
composer:
|
||||
command: create-project
|
||||
arguments: package/package /path/to/project ~1.0
|
||||
working_dir: /path/to/project
|
||||
prefer_dist: yes
|
||||
|
||||
# Installs package globally
|
||||
- composer:
|
||||
- name: Install a package globally
|
||||
composer:
|
||||
command: require
|
||||
global_command: yes
|
||||
arguments: my/package
|
||||
|
|
|
@ -66,42 +66,41 @@ author: "Franck Cuny (@fcuny)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# install Dancer perl package
|
||||
- cpanm:
|
||||
- name: Install Dancer perl package
|
||||
cpanm:
|
||||
name: Dancer
|
||||
|
||||
# install version 0.99_05 of the Plack perl package
|
||||
- cpanm:
|
||||
- name: Install version 0.99_05 of the Plack perl package
|
||||
cpanm:
|
||||
name: MIYAGAWA/Plack-0.99_05.tar.gz
|
||||
|
||||
# install Dancer into the specified locallib
|
||||
- cpanm:
|
||||
- name: Install Dancer into the specified locallib
|
||||
cpanm:
|
||||
name: Dancer
|
||||
locallib: /srv/webapps/my_app/extlib
|
||||
|
||||
# install perl dependencies from local directory
|
||||
- cpanm:
|
||||
- name: Install perl dependencies from local directory
|
||||
cpanm:
|
||||
from_path: /srv/webapps/my_app/src/
|
||||
|
||||
# install Dancer perl package without running the unit tests in indicated locallib
|
||||
- cpanm:
|
||||
- name: Install Dancer perl package without running the unit tests in indicated locallib
|
||||
cpanm:
|
||||
name: Dancer
|
||||
notest: True
|
||||
locallib: /srv/webapps/my_app/extlib
|
||||
|
||||
# install Dancer perl package from a specific mirror
|
||||
- cpanm:
|
||||
- name: Install Dancer perl package from a specific mirror
|
||||
cpanm:
|
||||
name: Dancer
|
||||
mirror: 'http://cpan.cpantesters.org/'
|
||||
|
||||
# install Dancer perl package into the system root path
|
||||
- cpanm:
|
||||
- name: Install Dancer perl package into the system root path
|
||||
cpanm:
|
||||
name: Dancer
|
||||
system_lib: yes
|
||||
|
||||
# install Dancer if it's not already installed
|
||||
# OR the installed version is older than version 1.0
|
||||
- cpanm:
|
||||
- name: Install Dancer if it is not already installed OR the installed version is older than version 1.0
|
||||
cpanm:
|
||||
name: Dancer
|
||||
version: '1.0'
|
||||
'''
|
||||
|
|
|
@ -61,13 +61,13 @@ author: "Matt Wright (@mattupstate)"
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Examples from Ansible Playbooks
|
||||
- easy_install:
|
||||
- name: Install or update pip
|
||||
easy_install:
|
||||
name: pip
|
||||
state: latest
|
||||
|
||||
# Install Bottle into the specified virtualenv.
|
||||
- easy_install:
|
||||
- name: Install Bottle into the specified virtualenv
|
||||
easy_install:
|
||||
name: bottle
|
||||
virtualenv: /webapps/myapp/venv
|
||||
'''
|
||||
|
|
|
@ -94,19 +94,19 @@ author:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Installs version 1.0 of vagrant.
|
||||
- gem:
|
||||
- name: Install version 1.0 of vagrant
|
||||
gem:
|
||||
name: vagrant
|
||||
version: 1.0
|
||||
state: present
|
||||
|
||||
# Installs latest available version of rake.
|
||||
- gem:
|
||||
- name: Install latest available version of rake
|
||||
gem:
|
||||
name: rake
|
||||
state: latest
|
||||
|
||||
# Installs rake version 1.0 from a local gem on disk.
|
||||
- gem:
|
||||
- name: Install rake version 1.0 from a local gem on disk
|
||||
gem:
|
||||
name: rake
|
||||
gem_source: /path/to/gems/rake-1.0.gem
|
||||
state: present
|
||||
|
|
|
@ -119,21 +119,21 @@ extends_documentation_fragment:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Download the latest version of the JUnit framework artifact from Maven Central
|
||||
- maven_artifact:
|
||||
- name: Download the latest version of the JUnit framework artifact from Maven Central
|
||||
maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
dest: /tmp/junit-latest.jar
|
||||
|
||||
# Download JUnit 4.11 from Maven Central
|
||||
- maven_artifact:
|
||||
- name: Download JUnit 4.11 from Maven Central
|
||||
maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
version: 4.11
|
||||
dest: /tmp/junit-4.11.jar
|
||||
|
||||
# Download an artifact from a private repository requiring authentication
|
||||
- maven_artifact:
|
||||
- name: Download an artifact from a private repository requiring authentication
|
||||
maven_artifact:
|
||||
group_id: com.company
|
||||
artifact_id: library-name
|
||||
repository_url: 'https://repo.company.com/maven'
|
||||
|
@ -141,31 +141,31 @@ EXAMPLES = '''
|
|||
password: pass
|
||||
dest: /tmp/library-name-latest.jar
|
||||
|
||||
# Download a WAR File to the Tomcat webapps directory to be deployed
|
||||
- maven_artifact:
|
||||
- name: Download a WAR File to the Tomcat webapps directory to be deployed
|
||||
maven_artifact:
|
||||
group_id: com.company
|
||||
artifact_id: web-app
|
||||
extension: war
|
||||
repository_url: 'https://repo.company.com/maven'
|
||||
dest: /var/lib/tomcat7/webapps/web-app.war
|
||||
|
||||
# Keep a downloaded artifact's name, i.e. retain the version
|
||||
- maven_artifact:
|
||||
- name: Keep a downloaded artifact's name, i.e. retain the version
|
||||
maven_artifact:
|
||||
version: latest
|
||||
artifact_id: spring-core
|
||||
group_id: org.springframework
|
||||
dest: /tmp/
|
||||
keep_name: yes
|
||||
|
||||
# Download the latest version of the JUnit framework artifact from Maven local
|
||||
- maven_artifact:
|
||||
- name: Download the latest version of the JUnit framework artifact from Maven local
|
||||
maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
dest: /tmp/junit-latest.jar
|
||||
repository_url: "file://{{ lookup('env','HOME') }}/.m2/repository"
|
||||
|
||||
# Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central
|
||||
- maven_artifact:
|
||||
- name: Download the latest version between 3.8 and 4.0 (exclusive) of the JUnit framework artifact from Maven Central
|
||||
maven_artifact:
|
||||
group_id: junit
|
||||
artifact_id: junit
|
||||
version_by_spec: "[3.8,4.0)"
|
||||
|
|
|
@ -36,23 +36,23 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Install pear package
|
||||
- pear:
|
||||
- name: Install pear package
|
||||
pear:
|
||||
name: Net_URL2
|
||||
state: present
|
||||
|
||||
# Install pecl package
|
||||
- pear:
|
||||
- name: Install pecl package
|
||||
pear:
|
||||
name: pecl/json_post
|
||||
state: present
|
||||
|
||||
# Upgrade package
|
||||
- pear:
|
||||
- name: Upgrade package
|
||||
pear:
|
||||
name: Net_URL2
|
||||
state: latest
|
||||
|
||||
# Remove packages
|
||||
- pear:
|
||||
- name: Remove packages
|
||||
pear:
|
||||
name: Net_URL2,pecl/json_post
|
||||
state: absent
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue