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
48827a31
Commit
48827a31
authored
Jul 07, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added minimal testing for special template vars
parent
ec145a61
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
0 deletions
+48
-0
test/integration/non_destructive.yml
+1
-0
test/integration/roles/test_special_vars/meta/main.yml
+3
-0
test/integration/roles/test_special_vars/tasks/main.yml
+37
-0
test/integration/roles/test_special_vars/templates/foo.j2
+7
-0
test/integration/roles/test_special_vars/vars/main.yml
+0
-0
No files found.
test/integration/non_destructive.yml
View file @
48827a31
...
...
@@ -14,6 +14,7 @@
-
{
role
:
test_copy
,
tags
:
test_copy
}
-
{
role
:
test_stat
,
tags
:
test_stat
}
-
{
role
:
test_template
,
tags
:
test_template
}
-
{
role
:
test_special_vars
,
tags
:
test_special_vars
}
-
{
role
:
test_file
,
tags
:
test_file
}
-
{
role
:
test_fetch
,
tags
:
test_fetch
}
-
{
role
:
test_synchronize
,
tags
:
test_synchronize
}
...
...
test/integration/roles/test_special_vars/meta/main.yml
0 → 100644
View file @
48827a31
dependencies
:
-
prepare_tests
test/integration/roles/test_special_vars/tasks/main.yml
0 → 100644
View file @
48827a31
# test code for the template module
# (c) 2015, Brian Coca <bcoca@ansible.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/>.
-
name
:
veryfiy ansible_managed
template
:
src=foo.j2 dest={{output_dir}}/special_vars.yaml
-
name
:
read the file into facts
include_vars
:
"
{{output_dir}}/special_vars.yaml"
-
name
:
veriy all test vars are defined
assert
:
that
:
-
'
item
in
hostvars[inventory_hostname].keys()'
with_items
:
-
test_template_host
-
test_template_path
-
test_template_mtime
-
test_template_uid
-
test_template_fullpath
-
test_template_run_date
-
test_ansible_managed
test/integration/roles/test_special_vars/templates/foo.j2
0 → 100644
View file @
48827a31
test_template_host: "{{template_host}}"
test_template_path: "{{template_path}}"
test_template_mtime: "{{template_mtime}}"
test_template_uid: "{{template_uid}}"
test_template_fullpath: "{{template_fullpath}}"
test_template_run_date: "{{template_run_date}}"
test_ansible_managed: "{{ansible_managed}}"
test/integration/roles/test_special_vars/vars/main.yml
0 → 100644
View file @
48827a31
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