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
e18ede85
Commit
e18ede85
authored
Aug 23, 2013
by
shirou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
supports nested values of ohai.
parent
f40d39bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
library/system/setup
+4
-7
No files found.
library/system/setup
View file @
e18ede85
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
#
#
n
This file is part of Ansible
# This file is part of Ansible
#
#
# Ansible is free software: you can redistribute it and/or modify
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
...
@@ -2104,9 +2104,7 @@ def run_setup(module):
...
@@ -2104,9 +2104,7 @@ def run_setup(module):
for
(
k
,
v
)
in
facter_ds
.
items
():
for
(
k
,
v
)
in
facter_ds
.
items
():
setup_options
[
"facter_
%
s"
%
k
]
=
v
setup_options
[
"facter_
%
s"
%
k
]
=
v
# ditto for ohai, but just top level string keys
# ditto for ohai
# because it contains a lot of nested stuff we can't use for
# templating w/o making a nicer key for it (TODO)
if
ohai_path
is
not
None
:
if
ohai_path
is
not
None
:
rc
,
out
,
err
=
module
.
run_command
(
ohai_path
)
rc
,
out
,
err
=
module
.
run_command
(
ohai_path
)
...
@@ -2117,9 +2115,8 @@ def run_setup(module):
...
@@ -2117,9 +2115,8 @@ def run_setup(module):
ohai
=
False
ohai
=
False
if
ohai
:
if
ohai
:
for
(
k
,
v
)
in
ohai_ds
.
items
():
for
(
k
,
v
)
in
ohai_ds
.
items
():
if
type
(
v
)
==
str
or
type
(
v
)
==
unicode
:
k2
=
"ohai_
%
s"
%
k
.
replace
(
'-'
,
'_'
)
k2
=
"ohai_
%
s"
%
k
.
replace
(
'-'
,
'_'
)
setup_options
[
k2
]
=
v
setup_options
[
k2
]
=
v
setup_result
=
{
'ansible_facts'
:
{}
}
setup_result
=
{
'ansible_facts'
:
{}
}
...
...
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