From 51d60e8ec7d9eb1be20782fbceb0f355305b3837 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 11 Oct 2015 18:06:48 +0000 Subject: [PATCH] Try doing this with ini_file instead of template. --- roles/infinote/tasks/main.yml | 26 ++++++++++++++++++++----- roles/infinote/templates/infinoted.conf | 26 ------------------------- 2 files changed, 21 insertions(+), 31 deletions(-) delete mode 100644 roles/infinote/templates/infinoted.conf diff --git a/roles/infinote/tasks/main.yml b/roles/infinote/tasks/main.yml index b2ac75d65d..419d2f1f99 100644 --- a/roles/infinote/tasks/main.yml +++ b/roles/infinote/tasks/main.yml @@ -41,8 +41,24 @@ - infinote - config -- name: add config file for infinoted - template: src=infinoted.conf dest=/etc/xdg/infinoted.conf - tags: - - infinote - - config +- name: setup vaules in infinoted section + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=certificate-file value=/etc/pki/tls/certs/wildcard-2014.fedoraproject.org.cert + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=key-file value=/etc/pki/tls/private/wildcard-2014.fedoraproject.org.key + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=certificate-chain value=/etc/pki/tls/certs/wildcard-2014.fedoraproject.org.intermediate.cert + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=port value=6522 + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=security-policy value=require-tls + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=root-directory value=/srv/infinote + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=plugins value=note-text,autosave,directory-sync,logging + ini_file: dest=/etc/xdg/infinoted.conf section=infinoted option=password value={{ infinote-password }} + +- name: setup vaules in autosave section + ini_file: dest=/etc/xdg/infinoted.conf section=autosave option=interval value=60 + +- name: setup vaules in directory-sync section + ini_file: dest=/etc/xdg/infinoted.conf section=directory-synnc option=interval value=10 + +- name: setup vaules in logging section + ini_file: dest=/etc/xdg/infinoted.conf section=logging option=log-connections value=true + ini_file: dest=/etc/xdg/infinoted.conf section=logging option=log-connection-errors value=true + ini_file: dest=/etc/xdg/infinoted.conf section=logging option=log-session-errors value=true + ini_file: dest=/etc/xdg/infinoted.conf section=logging option=log-session-request-extra value=true diff --git a/roles/infinote/templates/infinoted.conf b/roles/infinote/templates/infinoted.conf deleted file mode 100644 index 68256ec199..0000000000 --- a/roles/infinote/templates/infinoted.conf +++ /dev/null @@ -1,26 +0,0 @@ -[infinoted] -certificate-file=/etc/pki/tls/certs/wildcard-2014.fedoraproject.org.cert -key-file=/etc/pki/tls/private/wildcard-2014.fedoraproject.org.key -certificate-chain=/etc/pki/tls/certs/wildcard-2014.fedoraproject.org.intermediate.cert -port=6522 -security-policy=require-tls -root-directory=/srv/infinote -plugins=note-text,autosave,directory-sync,logging -password="{{ infinote-password }}" - -[autosave] -interval=60 -# TODO: write git hook. https://github.com/gobby/gobby/wiki/PluginAutosave -#hook= - -[directory-sync] -directory=/srv/web/infinote -interval=10 -# TODO: write git hook. https://github.com/gobby/gobby/wiki/PluginDirectorySync -#hook= - -[logging] -log-connections=true -log-connection-errors=true -log-session-errors=true -log-session-request-extra=true