diff --git a/.gitignore b/.gitignore index f0a8630..b8eb931 100644 --- a/.gitignore +++ b/.gitignore @@ -144,3 +144,6 @@ cython_debug/ # Project specific message.txt config.py +inventory.txt +ansible/host_vars/* +!.keep diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml new file mode 100644 index 0000000..58a8201 --- /dev/null +++ b/ansible/group_vars/all.yml @@ -0,0 +1,2 @@ +--- +message_file: message.txt diff --git a/ansible/host_vars/.keep b/ansible/host_vars/.keep new file mode 100644 index 0000000..e69de29 diff --git a/ansible/playbook.yml b/ansible/playbook.yml new file mode 100644 index 0000000..a30e42e --- /dev/null +++ b/ansible/playbook.yml @@ -0,0 +1,12 @@ +- hosts: autoreply_editor + gather_facts: false + tasks: + - name: Get newest version of autoreply-editor + git: + repo: https://src.mehl.mx/mxmehl/autoreply-editor.git + dest: autoreply-editor + + - name: Deploy config file + template: + src: config.py.j2 + dest: autoreply-editor/config.py diff --git a/ansible/templates/config.py.j2 b/ansible/templates/config.py.j2 new file mode 100644 index 0000000..bbc973b --- /dev/null +++ b/ansible/templates/config.py.j2 @@ -0,0 +1,3 @@ +MESSAGE_FILE = "{{ message_file }}" +BASIC_AUTH_USERNAME = "{{ auth_user }} +BASIC_AUTH_PASSWORD = "{{ auth_pass }}"