title: Sorting of strings variable in ansible playbook and display result in asending order
body: <p>I have list of variable like,
  item-1, item-22, item-3, item-99 i need to display as result of ansible playbook in following form</p>
  <p>item-1, item-3, item-22, item-99.</p>
  <p>I tried with below syntax but no luck.</p>
  <pre><code>- set_fact:
        sorted_list_values: &quot;{{ cluster_info | sort }}&quot;
  </code></pre>
  <p>also I created one library folder and inside that i tried to written python module and tried to refer in ansible playbook but it gives me indention error.</p>
  <pre><code>#!/usr/bin/python
  import json
  from ansible.module_utils.basic import *
  import sysy
  def main():
  
          module = AnsibleModule(
                   argument_spec = dict(
                          var1   = dict(required=True, type='str'),
                          var2   = dict(required=True, type='str'),
                          var3   = dict(required=True, type='str'),
                          var4   = dict(required=True, type='str'),
                   )
          )
  
                  var1 = module.params['var1']
                  var2 = module.params['var2']
                  var3 = module.params['var3']
                  var4 = module.params['var4']
  
                 dict1 = OrderedDict(sorted(dict.items()))
  
              module.exit_json(changed=False, meta=response)
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  <p>actually i am novice in python.</p>
  <p>Any link or guidance would be really appreciated to sort strings variable and display as ansible playbook resilt.
  Thanks</p>