Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
testbed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michael Alan Marsh
testbed
Commits
15c3ad36
Commit
15c3ad36
authored
7 years ago
by
Mike Marsh
Browse files
Options
Downloads
Patches
Plain Diff
more removals
parent
edff62ed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
library/check_python_module
+0
-20
0 additions, 20 deletions
library/check_python_module
library/load_em_up
+0
-32
0 additions, 32 deletions
library/load_em_up
with
0 additions
and
52 deletions
library/check_python_module
deleted
100755 → 0
+
0
−
20
View file @
edff62ed
#! /usr/bin/env python
import
importlib
def
main
():
module
=
AnsibleModule
(
argument_spec
=
dict
(
name
=
dict
(
required
=
True
,
type
=
'
str
'
),
))
is_installed
=
False
try
:
importlib
.
import_module
(
module
.
params
[
'
name
'
]
)
is_installed
=
True
except
:
pass
module
.
exit_json
(
changed
=
True
,
installed
=
is_installed
)
from
ansible.module_utils.basic
import
*
main
()
This diff is collapsed.
Click to expand it.
library/load_em_up
deleted
100644 → 0
+
0
−
32
View file @
edff62ed
#! /usr/bin/env python
import
json
ctr_list
=
[]
def
parse_file
(
fname
,
select
):
fd
=
open
(
fname
)
j
=
json
.
load
(
fd
)
for
entry
in
j
[
'
manifest
'
]:
data
=
entry
[
'
data
'
]
if
'
container
'
in
data
:
ctr
=
data
[
'
container
'
]
t
=
ctr
[
'
type
'
]
ip
=
ctr
[
'
docker_ip
'
]
name
=
ctr
[
'
name
'
]
if
select
is
None
or
t
==
select
:
ctr_list
.
append
(
{
'
ip
'
:
ip
,
'
type
'
:
t
,
'
name
'
:
name
}
)
def
main
():
module
=
AnsibleModule
(
argument_spec
=
dict
(
file
=
dict
(
required
=
True
,
type
=
'
str
'
),
select
=
dict
(
type
=
'
str
'
,
default
=
None
),
))
parse_file
(
module
.
params
[
'
file
'
],
module
.
params
[
'
select
'
])
module
.
exit_json
(
containers
=
json
.
dumps
(
ctr_list
))
from
ansible.module_utils.basic
import
*
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment