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
92c8275f
Commit
92c8275f
authored
Apr 16, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made certain flags part of base to make them universally settable
parent
1f7d23fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
v2/ansible/playbook/base.py
+10
-0
v2/ansible/playbook/play.py
+0
-6
v2/ansible/playbook/task.py
+0
-6
No files found.
v2/ansible/playbook/base.py
View file @
92c8275f
...
@@ -41,6 +41,16 @@ from ansible.template import template
...
@@ -41,6 +41,16 @@ from ansible.template import template
class
Base
:
class
Base
:
# connection/transport
_connection
=
FieldAttribute
(
isa
=
'string'
)
_port
=
FieldAttribute
(
isa
=
'int'
)
_remote_user
=
FieldAttribute
(
isa
=
'string'
)
# vars and flags
_vars
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_environment
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_no_log
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
def
__init__
(
self
):
def
__init__
(
self
):
# initialize the data loader and variable manager, which will be provided
# initialize the data loader and variable manager, which will be provided
...
...
v2/ansible/playbook/play.py
View file @
92c8275f
...
@@ -56,15 +56,11 @@ class Play(Base, Taggable, Become):
...
@@ -56,15 +56,11 @@ class Play(Base, Taggable, Become):
_accelerate_port
=
FieldAttribute
(
isa
=
'int'
,
default
=
5099
)
# should be alias of port
_accelerate_port
=
FieldAttribute
(
isa
=
'int'
,
default
=
5099
)
# should be alias of port
# Connection
# Connection
_connection
=
FieldAttribute
(
isa
=
'string'
,
default
=
'smart'
)
_gather_facts
=
FieldAttribute
(
isa
=
'string'
,
default
=
'smart'
)
_gather_facts
=
FieldAttribute
(
isa
=
'string'
,
default
=
'smart'
)
_hosts
=
FieldAttribute
(
isa
=
'list'
,
default
=
[],
required
=
True
)
_hosts
=
FieldAttribute
(
isa
=
'list'
,
default
=
[],
required
=
True
)
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
'<no name specified>'
)
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
'<no name specified>'
)
_port
=
FieldAttribute
(
isa
=
'int'
,
default
=
22
)
_remote_user
=
FieldAttribute
(
isa
=
'string'
)
# Variable Attributes
# Variable Attributes
_vars
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_vars_files
=
FieldAttribute
(
isa
=
'list'
,
default
=
[])
_vars_files
=
FieldAttribute
(
isa
=
'list'
,
default
=
[])
_vars_prompt
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_vars_prompt
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_vault_password
=
FieldAttribute
(
isa
=
'string'
)
_vault_password
=
FieldAttribute
(
isa
=
'string'
)
...
@@ -80,9 +76,7 @@ class Play(Base, Taggable, Become):
...
@@ -80,9 +76,7 @@ class Play(Base, Taggable, Become):
# Flag/Setting Attributes
# Flag/Setting Attributes
_any_errors_fatal
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
_any_errors_fatal
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
_environment
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
_max_fail_percentage
=
FieldAttribute
(
isa
=
'string'
,
default
=
'0'
)
_max_fail_percentage
=
FieldAttribute
(
isa
=
'string'
,
default
=
'0'
)
_no_log
=
FieldAttribute
(
isa
=
'bool'
,
default
=
False
)
_serial
=
FieldAttribute
(
isa
=
'int'
,
default
=
0
)
_serial
=
FieldAttribute
(
isa
=
'int'
,
default
=
0
)
_strategy
=
FieldAttribute
(
isa
=
'string'
,
default
=
'linear'
)
_strategy
=
FieldAttribute
(
isa
=
'string'
,
default
=
'linear'
)
...
...
v2/ansible/playbook/task.py
View file @
92c8275f
...
@@ -63,10 +63,8 @@ class Task(Base, Conditional, Taggable, Become):
...
@@ -63,10 +63,8 @@ class Task(Base, Conditional, Taggable, Become):
_any_errors_fatal
=
FieldAttribute
(
isa
=
'bool'
)
_any_errors_fatal
=
FieldAttribute
(
isa
=
'bool'
)
_async
=
FieldAttribute
(
isa
=
'int'
,
default
=
0
)
_async
=
FieldAttribute
(
isa
=
'int'
,
default
=
0
)
_changed_when
=
FieldAttribute
(
isa
=
'string'
)
_changed_when
=
FieldAttribute
(
isa
=
'string'
)
_connection
=
FieldAttribute
(
isa
=
'string'
)
_delay
=
FieldAttribute
(
isa
=
'int'
,
default
=
5
)
_delay
=
FieldAttribute
(
isa
=
'int'
,
default
=
5
)
_delegate_to
=
FieldAttribute
(
isa
=
'string'
)
_delegate_to
=
FieldAttribute
(
isa
=
'string'
)
_environment
=
FieldAttribute
(
isa
=
'dict'
)
_failed_when
=
FieldAttribute
(
isa
=
'string'
)
_failed_when
=
FieldAttribute
(
isa
=
'string'
)
_first_available_file
=
FieldAttribute
(
isa
=
'list'
)
_first_available_file
=
FieldAttribute
(
isa
=
'list'
)
_ignore_errors
=
FieldAttribute
(
isa
=
'bool'
)
_ignore_errors
=
FieldAttribute
(
isa
=
'bool'
)
...
@@ -80,16 +78,12 @@ class Task(Base, Conditional, Taggable, Become):
...
@@ -80,16 +78,12 @@ class Task(Base, Conditional, Taggable, Become):
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
''
)
_name
=
FieldAttribute
(
isa
=
'string'
,
default
=
''
)
_no_log
=
FieldAttribute
(
isa
=
'bool'
)
_notify
=
FieldAttribute
(
isa
=
'list'
)
_notify
=
FieldAttribute
(
isa
=
'list'
)
_poll
=
FieldAttribute
(
isa
=
'int'
)
_poll
=
FieldAttribute
(
isa
=
'int'
)
_register
=
FieldAttribute
(
isa
=
'string'
)
_register
=
FieldAttribute
(
isa
=
'string'
)
_remote_user
=
FieldAttribute
(
isa
=
'string'
)
_retries
=
FieldAttribute
(
isa
=
'int'
,
default
=
1
)
_retries
=
FieldAttribute
(
isa
=
'int'
,
default
=
1
)
_run_once
=
FieldAttribute
(
isa
=
'bool'
)
_run_once
=
FieldAttribute
(
isa
=
'bool'
)
_transport
=
FieldAttribute
(
isa
=
'string'
)
_until
=
FieldAttribute
(
isa
=
'list'
)
# ?
_until
=
FieldAttribute
(
isa
=
'list'
)
# ?
_vars
=
FieldAttribute
(
isa
=
'dict'
,
default
=
dict
())
def
__init__
(
self
,
block
=
None
,
role
=
None
,
task_include
=
None
):
def
__init__
(
self
,
block
=
None
,
role
=
None
,
task_include
=
None
):
''' constructors a task, without the Task.load classmethod, it will be pretty blank '''
''' constructors a task, without the Task.load classmethod, it will be pretty blank '''
...
...
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