Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2d9087b8
Commit
2d9087b8
authored
Nov 14, 2013
by
jctanner
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4484 from mscherer/add_short_hostname
ansible-pull by default will look for local.yml and $fqdn.yml.
parents
4707e3a4
92147aff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
bin/ansible-pull
+7
-4
docs/man/man1/ansible-pull.1.asciidoc.in
+2
-2
No files found.
bin/ansible-pull
View file @
2d9087b8
...
...
@@ -32,8 +32,9 @@
# for playbooks in the following order, stopping at the first match:
#
# 1. $workdir/path/playbook.yml, if specified
# 2. $workdir/$hostname.yml
# 3. $workdir/local.yml
# 2. $workdir/$fqdn.yml
# 3. $workdir/$hostname.yml
# 4. $workdir/local.yml
#
# the source repo must contain at least one of these playbooks.
...
...
@@ -80,10 +81,12 @@ def select_playbook(path, args):
return
None
return
playbook
else
:
hostpb
=
"
%
s/
%
s.yml"
%
(
path
,
socket
.
getfqdn
())
fqdn
=
socket
.
getfqdn
()
hostpb
=
"
%
s/
%
s.yml"
%
(
path
,
fqdn
)
shorthostpb
=
"
%
s/
%
s.yml"
%
(
path
,
fqdn
.
split
(
'.'
)[
0
])
localpb
=
"
%
s/
%
s"
%
(
path
,
DEFAULT_PLAYBOOK
)
errors
=
[]
for
pb
in
[
hostpb
,
localpb
]:
for
pb
in
[
hostpb
,
shorthostpb
,
localpb
]:
rc
=
try_playbook
(
pb
)
if
rc
==
0
:
playbook
=
pb
...
...
docs/man/man1/ansible-pull.1.asciidoc.in
View file @
2d9087b8
...
...
@@ -43,8 +43,8 @@ OPTIONAL ARGUMENT
The name of one the YAML format files to run as an ansible playbook. This can
be a relative path within the checkout. If not provided, ansible-pull
will look for a playbook based on the host's fully-qualified domain name
and
finally a playbook named *local.yml*.
will look for a playbook based on the host's fully-qualified domain name
, on the
host hostname and
finally a playbook named *local.yml*.
OPTIONS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment