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
4e4308b8
Commit
4e4308b8
authored
Oct 03, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refactor_pass' into devel
parents
e24825cb
ff87ac08
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
18 deletions
+28
-18
lib/ansible/modules/core
+1
-1
v2/ansible/playbook/__init__.py
+1
-1
v2/ansible/playbook/base.py
+5
-2
v2/ansible/playbook/conditional.py
+6
-5
v2/ansible/playbook/tag.py
+15
-9
v2/ansible/playbook/task.py
+0
-0
No files found.
core
@
9b35a391
Subproject commit
db5668b84c3a19498b843d0bfe34574aef40c193
Subproject commit
9b35a391213fe87834af5ebc907109de2bc0005f
v2/ansible/playbook/__init__.py
View file @
4e4308b8
...
...
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import
v2
.utils
import
ansible
.utils
class
Playbook
(
object
):
def
__init__
(
self
,
filename
):
...
...
v2/ansible/playbook/base.py
View file @
4e4308b8
...
...
@@ -15,8 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from
errors
import
AnsibleError
from
playbook.tag
import
Tag
class
Base
(
object
):
def
__init__
(
self
):
pass
def
__init__
(
self
):
pass
v2/ansible/playbook/conditional.py
View file @
4e4308b8
...
...
@@ -15,15 +15,16 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import
v2.config
as
C
from
v2.utils
import
template
from
v2.utils
import
list_union
class
Conditional
(
object
):
def
__init__
(
self
,
task
):
pass
self
.
_task
=
task
self
.
_conditionals
=
[]
def
evaluate
(
self
,
context
):
pass
def
push
(
self
,
conditionals
):
if
not
isinstance
(
conditionals
,
list
):
conditionals
=
[
conditionals
]
self
.
_conditionals
.
extend
(
conditionals
)
v2/ansible/playbook/tag.py
View file @
4e4308b8
...
...
@@ -15,19 +15,25 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
from
v2.
errors
import
AnsibleError
from
v2
.utils
import
list_union
from
errors
import
AnsibleError
from
ansible
.utils
import
list_union
class
Tag
(
object
):
def
__init__
(
self
,
tags
=
[]):
self
.
tags
=
tags
assert
isinstance
(
tags
,
list
)
self
.
_tags
=
tags
def
push
(
self
,
tag
):
if
tag
not
in
self
.
tags
:
self
.
tags
.
append
(
tag
)
def
push
(
self
,
tags
):
if
not
isinstance
(
tags
,
list
):
tags
=
[
tags
]
for
tag
in
tags
:
if
not
isinstance
(
tag
,
basestring
):
tag
=
str
(
tag
)
if
tag
not
in
self
.
_tags
:
self
.
_tags
.
append
(
tag
)
def
get_tags
(
self
):
return
self
.
tags
return
self
.
_
tags
def
merge
(
self
,
tags
):
# returns a union of the tags, which can be a string,
...
...
@@ -38,8 +44,8 @@ class Tag(object):
tags
=
Tag
(
tags
)
elif
not
isinstance
(
tags
,
Tag
):
raise
AnsibleError
(
'expected a Tag() instance, instead got
%
s'
%
type
(
tags
))
return
utils
.
list_union
(
self
.
tags
,
tags
.
get_tags
())
return
utils
.
list_union
(
self
.
_
tags
,
tags
.
get_tags
())
def
matches
(
self
,
tag
):
return
tag
in
self
.
tags
return
tag
in
self
.
_
tags
v2/ansible/playbook/task.py
View file @
4e4308b8
This diff is collapsed.
Click to expand it.
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