Class: Ansible::Ruby::Modules::Git
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Git
- Defined in:
- lib/ansible/ruby/modules/generated/source_control/git.rb
Overview
Manage I(git) checkouts of repositories to deploy files or software.
Instance Method Summary collapse
-
#accept_hostkey ⇒ :yes, ...
If C(yes), ensure that “-o StrictHostKeyChecking=no” is present as an ssh option.
-
#archive ⇒ String?
Specify archive file path with extension.
-
#bare ⇒ :yes, ...
If C(yes), repository will be created as a bare repo, otherwise it will be a standard repo with a workspace.
-
#clone ⇒ :yes, ...
If C(no), do not clone the repository if it does not exist locally.
-
#depth ⇒ Object?
Create a shallow clone with a history truncated to the specified number or revisions.
-
#dest ⇒ String
The path of where the repository should be checked out.
-
#executable ⇒ Object?
Path to git executable to use.
-
#force ⇒ :yes, ...
If C(yes), any modified files in the working repository will be discarded.
-
#key_file ⇒ Object?
Specify an optional private key file path, on the target host, to use for the checkout.
-
#recursive ⇒ :yes, ...
If C(no), repository will be cloned without the –recursive option, skipping sub-modules.
-
#reference ⇒ Object?
Reference repository (see “git clone –reference …”).
-
#refspec ⇒ String?
Add an additional refspec to be fetched.
-
#remote ⇒ String?
Name of the remote.
-
#repo ⇒ String
Git, SSH, or HTTP(S) protocol address of the git repository.
-
#separate_git_dir ⇒ String?
The path to place the cloned repository.
-
#ssh_opts ⇒ Object?
Creates a wrapper script and exports the path as GIT_SSH which git then automatically uses to override ssh arguments.
-
#track_submodules ⇒ :yes, ...
If C(yes), submodules will track the latest commit on their master branch (or other branch specified in .gitmodules).
-
#umask ⇒ Object?
The umask to set before doing any checkouts, or any other repository maintenance.
-
#update ⇒ :yes, ...
If C(no), do not retrieve new revisions from the origin repository,Operations like archive will work on the existing (old) repository and might not respond to changes to the options version or remote.
-
#verify_commit ⇒ :yes, ...
If C(yes), when cloning or checking out a C(version) verify the signature of a GPG signed commit.
-
#version ⇒ String?
What version of the repository to check out.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#accept_hostkey ⇒ :yes, ...
Returns if C(yes), ensure that “-o StrictHostKeyChecking=no” is present as an ssh option.
24 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 24 attribute :accept_hostkey |
#archive ⇒ String?
Returns Specify archive file path with extension. If specified, creates an archive file of the specified format containing the tree structure for the source tree. Allowed archive formats [“zip”, “tar.gz”, “tar”, “tgz”],This will clone and perform git archive from local directory as not all git servers support git archive.
82 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 82 attribute :archive |
#bare ⇒ :yes, ...
Returns if C(yes), repository will be created as a bare repo, otherwise it will be a standard repo with a workspace.
63 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 63 attribute :bare |
#clone ⇒ :yes, ...
Returns If C(no), do not clone the repository if it does not exist locally.
52 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 52 attribute :clone |
#depth ⇒ Object?
Returns Create a shallow clone with a history truncated to the specified number or revisions. The minimum possible value is C(1), otherwise ignored. Needs I(git>=1.9.1) to work correctly.
49 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 49 attribute :depth |
#dest ⇒ String
Returns The path of where the repository should be checked out. This parameter is required, unless C(clone) is set to C(no).
16 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 16 attribute :dest |
#executable ⇒ Object?
Returns Path to git executable to use. If not supplied, the normal mechanism for resolving binary paths will be used.
60 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 60 attribute :executable |
#force ⇒ :yes, ...
Returns If C(yes), any modified files in the working repository will be discarded. Prior to 0.7, this was always ‘yes’ and could not be disabled. Prior to 1.9, the default was ‘yes`.
45 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 45 attribute :force |
#key_file ⇒ Object?
Returns Specify an optional private key file path, on the target host, to use for the checkout.
31 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 31 attribute :key_file |
#recursive ⇒ :yes, ...
Returns if C(no), repository will be cloned without the –recursive option, skipping sub-modules.
70 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 70 attribute :recursive |
#reference ⇒ Object?
Returns Reference repository (see “git clone –reference …”).
34 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 34 attribute :reference |
#refspec ⇒ String?
Returns Add an additional refspec to be fetched. If version is set to a I(SHA-1) not reachable from any branch or tag, this option may be necessary to specify the ref containing the I(SHA-1). Uses the same syntax as the ‘git fetch’ command. An example value could be “refs/meta/config”.
41 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 41 attribute :refspec |
#remote ⇒ String?
Returns Name of the remote.
37 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 37 attribute :remote |
#repo ⇒ String
Returns git, SSH, or HTTP(S) protocol address of the git repository.
12 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 12 attribute :repo |
#separate_git_dir ⇒ String?
Returns The path to place the cloned repository. If specified, Git repository can be separated from working tree.
86 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 86 attribute :separate_git_dir |
#ssh_opts ⇒ Object?
Returns Creates a wrapper script and exports the path as GIT_SSH which git then automatically uses to override ssh arguments. An example value could be “-o StrictHostKeyChecking=no”.
28 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 28 attribute :ssh_opts |
#track_submodules ⇒ :yes, ...
Returns if C(yes), submodules will track the latest commit on their master branch (or other branch specified in .gitmodules). If C(no), submodules will be kept at the revision specified by the main project. This is equivalent to specifying the –remote flag to git submodule update.
74 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 74 attribute :track_submodules |
#umask ⇒ Object?
Returns The umask to set before doing any checkouts, or any other repository maintenance.
67 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 67 attribute :umask |
#update ⇒ :yes, ...
Returns If C(no), do not retrieve new revisions from the origin repository,Operations like archive will work on the existing (old) repository and might not respond to changes to the options version or remote.
56 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 56 attribute :update |
#verify_commit ⇒ :yes, ...
Returns if C(yes), when cloning or checking out a C(version) verify the signature of a GPG signed commit. This requires C(git) version>=2.1.0 to be installed. The commit MUST be signed and the public key MUST be present in the GPG keyring.
78 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 78 attribute :verify_commit |
#version ⇒ String?
Returns What version of the repository to check out. This can be the literal string C(HEAD), a branch name, a tag name. It can also be a I(SHA-1) hash, in which case C(refspec) needs to be specified if the given revision is not already available.
20 |
# File 'lib/ansible/ruby/modules/generated/source_control/git.rb', line 20 attribute :version |