diff options
-rw-r--r-- | filter_plugins/oo_filters.py | 7 | ||||
-rw-r--r-- | roles/repos/tasks/main.yaml | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index 0c34cfc3e..703506b88 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -9,6 +9,12 @@ def oo_pdb(arg): pdb.set_trace() return arg +def oo_len(arg): + ''' This returns the length of the argument + Ex: "{{ hostvars | oo_len }}" + ''' + return len(arg) + def get_attr(data, attribute=None): ''' This looks up dictionary attributes of the form a.b.c and returns the value. Ex: data = {'a': {'b': {'c': 5}}} @@ -65,5 +71,6 @@ class FilterModule (object): return { "oo_select_keys": oo_select_keys, "oo_collect": oo_collect, + "oo_len": oo_len, "oo_pdb": oo_pdb } diff --git a/roles/repos/tasks/main.yaml b/roles/repos/tasks/main.yaml index ccddfc26c..48c123ab1 100644 --- a/roles/repos/tasks/main.yaml +++ b/roles/repos/tasks/main.yaml @@ -11,12 +11,6 @@ # src=RPM-GPG-KEY-redhat-release # dest=/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release -- name: Ensure rhel-7-libra-candidate client-key.pem exists - copy: src=client-key.pem dest=/var/lib/yum/client-key.pem - -- name: Ensure rhel-7-libra-candidate client-cert.pem exists - copy: src=client-cert.pem dest=/var/lib/yum/client-cert.pem - - name: Ensure rhel 7 libra candidate exists in yum.repos.d copy: src=rhel-7-libra-candidate.repo dest=/etc/yum.repos.d/rhel-7-libra-candidate.repo |