Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

ops_template.py: content argument to take the yaml/json variable #3340

Closed
keithnoguchi opened this issue Mar 29, 2016 · 2 comments
Closed

ops_template.py: content argument to take the yaml/json variable #3340

keithnoguchi opened this issue Mar 29, 2016 · 2 comments

Comments

@keithnoguchi
Copy link
Contributor

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

network/openswitch/ops_template.py

ANSIBLE VERSION
ansible 2.1.0
  config file = /Users/kei/vagrant/ansible/dc-on-docker/ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION

Here is the sample way of passing YAML variable to ops_template module through content:

- name: configure through json
  hosts: switch
  become: yes
  vars:
    config:
      system:
        hostname: test
  tasks:
    - ops_template:
      content: "{{ config }}"
OS / ENVIRONMENT

N/A

SUMMARY

Since the src variable of ops_template is for the file name, we want to have another variable
to pass the actual content, hence, content variable. :)

@privateip privateip added this to the 2.2.0 milestone May 18, 2016
@privateip privateip self-assigned this Jun 15, 2016
@ansibot
Copy link

ansibot commented Jul 31, 2016

@privateip ping, this issue is waiting for your response.
click here for bot help

@gundalow
Copy link
Contributor

gundalow commented Sep 7, 2016

For Ansible 2.2 this functionality will be made available in the ops_config module.

Closing as code has been done

@gundalow gundalow closed this as completed Sep 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants