From 1a536f861891b880fbbc3cbceb3e4322f9729a3c Mon Sep 17 00:00:00 2001 From: surtur Date: Sat, 21 Nov 2020 20:29:32 +0100 Subject: [PATCH] chore: add ansible config, hosts and syncpush.yml task --- ansible.cfg | 15 +++++++++++++++ hosts | 2 ++ syncpush.yml | 15 +++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 ansible.cfg create mode 100644 hosts create mode 100644 syncpush.yml diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..18ee11d --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,15 @@ +[defaults] +inventory = ./hosts +library = library +remote_tmp = $HOME/.ansible/tmp +remote_user = root +nocows = 1 +roles_path = roles +retry_files_enabled = False +callback_plugins = plugins/callback +callback_whitelist = profile_tasks + +[ssh_connection] +pipelining = True +scp_if_ssh = True +retries = 5 diff --git a/hosts b/hosts new file mode 100644 index 0000000..d0dcf5d --- /dev/null +++ b/hosts @@ -0,0 +1,2 @@ +[nebula] +dotya.ml diff --git a/syncpush.yml b/syncpush.yml new file mode 100644 index 0000000..04fe83c --- /dev/null +++ b/syncpush.yml @@ -0,0 +1,15 @@ +--- +- name: Sync push task + hosts: nebula + remote_user: root + tasks: + - name: Copy gitea templates to nebula + tags: sync-push + synchronize: + src: "{{ item }}" + dest: "/var/lib/gitea/{{ item }}-test" + mode: push + register: syncfile + with_items: + - "custom/public/robots.txt" + - "custom/templates/home.tmpl"