Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
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
ops
jumpserver
Commits
04e7073a
Commit
04e7073a
authored
Nov 18, 2015
by
yumaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. fixed ansible api auto load local host file (/etc/ansible/hosts) bug with null list
parent
2ccd0724
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ansible_api.py
jperm/ansible_api.py
+2
-2
ansible_need.txt
jperm/playbooks/ansible_need.txt
+0
-0
No files found.
jperm/ansible_api.py
View file @
04e7073a
...
...
@@ -15,9 +15,9 @@ from utils import get_rand_pass
import
os.path
API_DIR
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
ANSIBLE_DIR
=
os
.
path
.
join
(
API_DIR
,
'playbooks'
)
NULL_FILE
=
os
.
path
.
join
(
ANSIBLE_DIR
,
'ansible_need.txt'
)
...
...
@@ -62,7 +62,7 @@ class MyInventory(object):
[{"hostname": "10.10.10.10", "port": "22", "username": "test", "password": "mypass"}, ...]
"""
self
.
resource
=
resource
self
.
inventory
=
Inventory
(
host_list
=
NULL_FILE
)
self
.
inventory
=
Inventory
(
host_list
=
[]
)
self
.
gen_inventory
()
def
add_group
(
self
,
hosts
,
groupname
,
groupvars
=
None
):
...
...
jperm/playbooks/ansible_need.txt
deleted
100644 → 0
View file @
2ccd0724
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