From 01603d2043c2d1ded1ec4044eeffc1b2234cc6c3 Mon Sep 17 00:00:00 2001 From: "Daniel A. Maierhofer" Date: Fri, 13 Jul 2018 13:22:00 +0200 Subject: [PATCH] Add git config and etckeeper --- defaults/main.yml | 1 + tasks/git.yml | 21 +++++++++++++++++++++ tasks/main.yml | 6 +++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tasks/git.yml diff --git a/defaults/main.yml b/defaults/main.yml index 509eb58..03c8753 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -99,3 +99,4 @@ common_postfix_smtpd_tls_session_cache_database: "btree:${data_directory}/smtpd_ common_rcfiles: True common_tty: True +common_git: True diff --git a/tasks/git.yml b/tasks/git.yml new file mode 100644 index 0000000..d934213 --- /dev/null +++ b/tasks/git.yml @@ -0,0 +1,21 @@ +--- +- name: git - gitconfig user.name + git_config: + name: user.name + scope: global + value: "root ({{ ansible_hostname }})" + +- name: git - gitconfig user.email + git_config: + name: user.email + scope: global + value: "admin@fet.at" + +- name: git - gitconfig core.editor + git_config: + name: core.editor + scope: global + value: "vim" + +- name: git - init etckeeper + command: etckeeper init creates=/etc/.git/ diff --git a/tasks/main.yml b/tasks/main.yml index e7ba1fd..4af8673 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -21,7 +21,7 @@ tags: common - name: copy some custom script - copy: dest="{{ item.dest }}" src="{{ item.src }}" owner=root group=root mode=0755 + copy: "dest={{ item.dest }} src={{ item.src }} owner=root group=root mode=0755" with_items: "{{ common_scripts }}" tags: common @@ -48,3 +48,7 @@ - import_tasks: tty.yml when: common_tty tags: ['common', 'tty'] + +- import_tasks: git.yml + when: common_git + tags: ['common', 'git']