[openstack-dev] [kolla] better solution for the non-ini format configure file

Steven Dake (stdake) stdake at cisco.com
Thu Jun 23 13:07:46 UTC 2016


Looks like a really cool feature, and possibly a way to non-ini files, such as policy.json files which we just want to copy rather then override.

Kolla already has ini merging for ini files though and the example you provide is an ini file.  I like Kolla's ini merging, and it is sort of an external interface, since operators have been using it, so to remove it would mean following the deprecation cycle.  I do agree this would be fantastic for straight copies of non-ini configuration files.

Regards
-steve

From: OpenStack Mailing List Archive <corpqa at gmail.com<mailto:corpqa at gmail.com>>
Reply-To: "openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Wednesday, June 22, 2016 at 8:47 PM
To: "openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] [kolla] better solution for the non-ini format configure file

Link: https://openstack.nimeyo.com/83165/?show=88496#a88496
From: AndrewLiu <andrew.lhj at gmail.com<mailto:andrew.lhj at gmail.com>>


Recently, we find this feature of ansible:
http://docs.ansible.com/ansible/playbooks_loops.html#finding-first-matched-files<https://openstack.nimeyo.com/tag/finding-first-matched-files>

A specific path of template file can be add in the ansible task.

If a user want to customize an non-ini template file, the user can copy the template file to the customization directory, and modify the template file as the user wants.

An example of how to modify the ansible task:

change from:

- name: Copying over horizon.conf
  template:
      src: "{{ item }}.conf.j2"
      dest: "{{ node_config_directory }}/{{ item }}/{{ item }}.conf"
  with_items:
      - "horizon"


to:

- name: Copying over horizon.conf
  template:
      src: "{{ item }}"
      dest: "{{ node_config_directory }}/horizon/horizon.conf"
  with_first_found:
      - "{{ node_custom_config }}/horizon.conf.j2"
      - "horizon.conf.j2"


But a convention of how to organize the directory structure of customization template files should be addressed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160623/6a29d7e0/attachment.html>


More information about the OpenStack-dev mailing list