From 8c008db933f437bef9bcb6db00c7fbf464d242a1 Mon Sep 17 00:00:00 2001 From: Sander Kuusemets <sander.kuusemets@ut.ee> Date: Mon, 8 May 2023 08:23:32 +0000 Subject: [PATCH] Update file main.yml --- tasks/main.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 077dcae..06afd7d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,6 +17,10 @@ shell: kubectl delete ns/lab11 failed_when: false +- name: K8s + shell: /usr/local/bin/kubectl patch service prometheus -n prometheus --type='json' -p='[{"op": "replace", "path": "/metadata/labels/app", "value": "loki"}]' + failed_when: false + - name: Named lineinfile: dest: /etc/named.conf @@ -45,11 +49,6 @@ line: "myorigin = localhost" state: present -- name: NFS - file: - dest: /etc/exports - state: absent - - name: Filesystems ansible.posix.mount: path: /mnt/nfs @@ -84,3 +83,19 @@ with_items: - httpd - postfix + +- name: Exports + file: + path: '/etc/exports' + state: absent + +- name: Exports + file: + path: '/etc/exports' + state: touch + +- name: Exports + shell: exportfs -a + +- name: Unconditionally reboot the machine with all defaults + ansible.builtin.reboot: -- GitLab