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
1420c492
Commit
1420c492
authored
Mar 02, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Still seeing some weirdness from ohai but we can probably simplify
this until we figure out what that is.
parent
e6a1acf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
library/ohai
+2
-15
No files found.
library/ohai
View file @
1420c492
#!/
usr/bin/python
#!/
bin/bash
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
...
...
@@ -18,17 +18,4 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
# requires 'ohai' to be installed
try
:
import
json
except
ImportError
:
import
simplejson
as
json
import
subprocess
cmd
=
subprocess
.
Popen
(
"/usr/bin/ohai"
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
out
,
err
=
cmd
.
communicate
()
# try to cleanup the JSON, for some reason facter --json doesn't need this hack
print
json
.
dumps
(
json
.
loads
(
out
))
/usr/bin/ohai
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