From fa4a4a8a6ff33a744ce9900d768fee3a11038013 Mon Sep 17 00:00:00 2001 From: binary Date: Fri, 5 Mar 2021 19:56:48 +0100 Subject: Cleanup common role --- roles/common/tasks/init_alpine.yml | 38 ------------------------------------- roles/common/tasks/init_openbsd.yml | 10 ---------- roles/common/tasks/main.yml | 34 ++++++++++++++++----------------- 3 files changed, 17 insertions(+), 65 deletions(-) delete mode 100644 roles/common/tasks/init_alpine.yml delete mode 100644 roles/common/tasks/init_openbsd.yml (limited to 'roles') diff --git a/roles/common/tasks/init_alpine.yml b/roles/common/tasks/init_alpine.yml deleted file mode 100644 index 68689bc..0000000 --- a/roles/common/tasks/init_alpine.yml +++ /dev/null @@ -1,38 +0,0 @@ - -# common ~~ tasks/init_alpine.yml -# specific tasks for Alpine initalization - ---- - -- name: Setup repositories for Alpine - shell: | - echo "https://mirror.ungleich.ch/mirror/packages/alpine/edge/main/" > /etc/apk/repositories - echo "https://mirror.ungleich.ch/mirror/packages/alpine/edge/community/" >> /etc/apk/repositories - echo "https://mirror.ungleich.ch/mirror/packages/alpine/edge/releases/" >> /etc/apk/repositories - -- name: Download virtio_vmmci - git: - repo: "https://github.com/voutilad/virtio_vmmci" - dest: /data/git/virtio_vmmci - -- name: Install virtio_vmmci - shell: make && make install && modprobe virtio_vmmci - args: - chdir: /data/git/virtio_vmmci - -- name: Enable virtio_vmmci module - shell: echo "virtio_vmmci" > /etc/modules-load.d/virtio_vmmci.conf - -- name: Download vmm_clock module - git: - repo: "https://github.com/voutilad/vmm_clock" - dest: /data/git/vmm_clock - -- name: Install vmm_clock module - shell: make && make install && modprobe vmm_clock - args: - chdir: /data/git/vmm_clock - -- name: Enable vmm_clock module - shell: echo "vmm_clock" > /etc/modules-load.d/vmm_clock.conf - diff --git a/roles/common/tasks/init_openbsd.yml b/roles/common/tasks/init_openbsd.yml deleted file mode 100644 index d4dae41..0000000 --- a/roles/common/tasks/init_openbsd.yml +++ /dev/null @@ -1,10 +0,0 @@ - -# common ~~ tasks/init_alpine.yml -# specific tasks for Openbsd initalization - ---- - -- name: Setup repositories for Openbsd - shell: echo "https://mirror.ungleich.ch/pub/OpenBSD/" > /etc/installurl - - diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 305e993..b562e88 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -3,46 +3,46 @@ --- -- name: check existence of data directory +- name: ensure existence of data directory file: path: /data - owner: "{{ user_root }}" - group: "{{ group_root }}" + owner: "0" + group: "0" + mode: "0755" state: directory - mode: 0755 -- name: check existence of zsh directoy +- name: ensure existence of zsh directoy file: path: /etc/zsh - owner: "{{ user_root }}" - group: "{{ group_root }}" + owner: "0" + group: "0" + mode: "0755" state: directory - mode: 0755 when: ansible_system == "Linux" - name: copy zsh configuration file copy: src: zshrc dest: "{{ path_zshconfig }}" - owner: "{{ user_root }}" - group: "{{ group_root }}" - mode: 0644 + owner: "0" + group: "0" + mode: "0644" - name: copy tmux configuration file copy: src: tmux.conf dest: "{{ path_tmuxconfig }}" - owner: "{{ user_root }}" - group: "{{ group_root }}" - mode: 0644 + owner: "0" + group: "0" + mode: "0644" - name: copy motd configuration file template: src: motd.j2 dest: /etc/motd - owner: "{{ user_root }}" - group: "{{ group_root }}" - mode: 0644 + owner: "0" + group: "0" + mode: "0644" - name: synchronize host hostname with config hostname hostname: name="{{ inventory_hostname }}" -- cgit v1.2.3