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
18f30b00
Commit
18f30b00
authored
Oct 15, 2014
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add python3-compat boiler to all core files
parent
ff8042c5
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
238 additions
and
1 deletions
+238
-1
v2/ansible/__init__.py
+4
-0
v2/ansible/config/__init__.py
+3
-0
v2/ansible/constants.py
+5
-0
v2/ansible/errors/__init__.py
+4
-0
v2/ansible/inventory/__init__.py
+7
-0
v2/ansible/modules/__init__.py
+4
-0
v2/ansible/parsing/__init__.py
+4
-0
v2/ansible/parsing/mod_args.py
+4
-0
v2/ansible/parsing/splitter.py
+4
-0
v2/ansible/parsing/yaml/__init__.py
+21
-0
v2/ansible/parsing/yaml/composer.py
+21
-0
v2/ansible/parsing/yaml/constructor.py
+21
-0
v2/ansible/parsing/yaml/loader.py
+21
-0
v2/ansible/parsing/yaml/objects.py
+22
-1
v2/ansible/playbook/__init__.py
+4
-0
v2/ansible/playbook/attribute.py
+4
-0
v2/ansible/playbook/base.py
+4
-0
v2/ansible/playbook/block.py
+4
-0
v2/ansible/playbook/conditional.py
+4
-0
v2/ansible/playbook/handler.py
+4
-0
v2/ansible/playbook/include.py
+3
-0
v2/ansible/playbook/play.py
+3
-0
v2/ansible/playbook/playbook_include.py
+3
-0
v2/ansible/playbook/role.py
+4
-0
v2/ansible/playbook/tag.py
+4
-0
v2/ansible/playbook/task.py
+4
-0
v2/ansible/playbook/task_include.py
+4
-0
v2/ansible/playbook/vars.py
+4
-0
v2/ansible/playbook/vars_file.py
+4
-0
v2/ansible/plugins/__init__.py
+4
-0
v2/ansible/plugins/action/__init__.py
+4
-0
v2/ansible/plugins/callback/__init__.py
+4
-0
v2/ansible/plugins/connections/__init__.py
+4
-0
v2/ansible/plugins/filter/__init__.py
+4
-0
v2/ansible/plugins/inventory/__init__.py
+4
-0
v2/ansible/plugins/lookup/__init__.py
+4
-0
v2/ansible/plugins/shell/__init__.py
+4
-0
v2/ansible/plugins/vars/__init__.py
+4
-0
No files found.
v2/ansible/__init__.py
View file @
18f30b00
...
...
@@ -14,3 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/config/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/constants.py
View file @
18f30b00
...
...
@@ -15,9 +15,14 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
import
os
import
pwd
import
sys
try
:
import
configparser
except
ImportError
:
...
...
v2/ansible/errors/__init__.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
import
os
from
ansible.parsing.yaml.objects
import
AnsibleBaseYAMLObject
...
...
v2/ansible/inventory/__init__.py
View file @
18f30b00
...
...
@@ -17,12 +17,17 @@
#############################################
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
class
Inventory
(
object
):
def
__init__
(
self
,
host_list
=
C
.
DEFAULT_HOST_LIST
,
vault_password
=
None
):
pass
def
get_hosts
(
self
,
pattern
=
"all"
):
pass
def
clear_pattern_cache
(
self
):
# Possibly not needed?
pass
def
groups_for_host
(
self
,
host
):
pass
...
...
@@ -55,8 +60,10 @@ class Inventory(object):
def
subset
(
self
,
subset_pattern
):
pass
def
lift_restriction
(
self
):
# HACK --
pass
def
lift_also_restriction
(
self
):
# HACK -- dead host skipping
pass
def
is_file
(
self
):
pass
...
...
v2/ansible/modules/__init__.py
View file @
18f30b00
...
...
@@ -14,3 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/parsing/__init__.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
ansible.errors
import
AnsibleError
,
AnsibleInternalError
def
load
(
self
,
data
):
...
...
v2/ansible/parsing/mod_args.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
six
import
iteritems
,
string_types
from
ansible.errors
import
AnsibleParserError
...
...
v2/ansible/parsing/splitter.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
def
parse_kv
(
args
,
check_raw
=
False
):
'''
Convert a string of key/value items to a dict. If any free-form params
...
...
v2/ansible/parsing/yaml/__init__.py
View file @
18f30b00
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
yaml
import
load
from
ansible.parsing.yaml.loader
import
AnsibleLoader
...
...
v2/ansible/parsing/yaml/composer.py
View file @
18f30b00
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
yaml.composer
import
Composer
from
yaml.nodes
import
MappingNode
...
...
v2/ansible/parsing/yaml/constructor.py
View file @
18f30b00
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
yaml.constructor
import
Constructor
from
ansible.parsing.yaml.objects
import
AnsibleMapping
...
...
v2/ansible/parsing/yaml/loader.py
View file @
18f30b00
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
yaml.reader
import
Reader
from
yaml.scanner
import
Scanner
from
yaml.parser
import
Parser
...
...
v2/ansible/parsing/yaml/objects.py
View file @
18f30b00
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
class
AnsibleBaseYAMLObject
(
object
):
'''
the base class used to sub-class python built-in objects
so that we can add attributes to them during yaml parsing
'''
_data_source
=
None
_line_number
=
None
...
...
v2/ansible/playbook/__init__.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
class
Playbook
(
object
):
def
__init__
(
self
,
filename
):
self
.
ds
=
v2
.
utils
.
load_yaml_from_file
(
filename
)
...
...
v2/ansible/playbook/attribute.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
#from ansible.common.errors import AnsibleError
class
Attribute
(
object
):
...
...
v2/ansible/playbook/base.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
io
import
FileIO
from
six
import
iteritems
,
string_types
...
...
v2/ansible/playbook/block.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
v2.playbook.base
import
PlaybookBase
class
Block
(
PlaybookBase
):
...
...
v2/ansible/playbook/conditional.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
class
Conditional
(
object
):
def
__init__
(
self
,
task
):
...
...
v2/ansible/playbook/handler.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
v2.errors
import
AnsibleError
from
v2.inventory
import
Host
from
v2.playbook
import
Task
...
...
v2/ansible/playbook/include.py
View file @
18f30b00
...
...
@@ -15,3 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/playbook/play.py
View file @
18f30b00
...
...
@@ -15,3 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/playbook/playbook_include.py
View file @
18f30b00
...
...
@@ -15,3 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/playbook/role.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
v2.playbook.base
import
PlaybookBase
from
v2.utils
import
list_union
...
...
v2/ansible/playbook/tag.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
errors
import
AnsibleError
from
ansible.utils
import
list_union
...
...
v2/ansible/playbook/task.py
View file @
18f30b00
...
...
@@ -15,6 +15,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
from
ansible.playbook.base
import
Base
from
ansible.playbook.attribute
import
Attribute
,
FieldAttribute
...
...
v2/ansible/playbook/task_include.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/playbook/vars.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/playbook/vars_file.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/__init__.py
View file @
18f30b00
...
...
@@ -16,6 +16,10 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
import
os
import
os.path
import
sys
...
...
v2/ansible/plugins/action/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/callback/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/connections/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/filter/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/inventory/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/lookup/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/shell/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
v2/ansible/plugins/vars/__init__.py
View file @
18f30b00
...
...
@@ -15,3 +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/>.
# Make coding more python3-ish
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
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