From ddc4d0297d55ecb5bc491d7303ab82b902047407 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:54:30 +0200 Subject: [PATCH] Add files via upload --- yaml_sub/install_docker.yaml | 8 ++++---- yaml_sub/mount_info.yaml | 14 +++++++------- yaml_sub/myrepo_clean.yaml | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/yaml_sub/install_docker.yaml b/yaml_sub/install_docker.yaml index 0fc1b33..a3e68b5 100644 --- a/yaml_sub/install_docker.yaml +++ b/yaml_sub/install_docker.yaml @@ -1,12 +1,12 @@ --- - name: remove other files - include_tasks: yaml_sub/myrepo_clean.yaml + ansible.builtin.include_tasks: yaml_sub/myrepo_clean.yaml - name: update file myrepo.repo - import_tasks: yaml_sub/myrepo_data.yaml + ansible.builtin.import_tasks: yaml_sub/myrepo_data.yaml - name: install docker rpm - dnf: + ansible.builtin.dnf: name: "docker-ce,docker-ce-cli,docker-ce-rootless-extras,docker-buildx-plugin,docker-compose-plugin,python3,python3-pip,python3-requests" state: latest update_cache: true @@ -16,7 +16,7 @@ enablerepo: "docker-ce-stable" - name: make sure docker service unit is started - systemd_service: + ansible.builtin.systemd_service: state: started name: docker enabled: true diff --git a/yaml_sub/mount_info.yaml b/yaml_sub/mount_info.yaml index 6ce0062..9eba641 100644 --- a/yaml_sub/mount_info.yaml +++ b/yaml_sub/mount_info.yaml @@ -1,6 +1,6 @@ --- - name: Mount /home - mount: + ansible.posix.mount: src: 10.10.1.21:/volume1/home_dir path: /home opts: rw,sync,hard,nolock @@ -8,7 +8,7 @@ state: mounted fstype: nfs - name: Mount /glocal - mount: + ansible.posix.mount: src: 10.10.1.1:/volume1/glocal path: /glocal opts: rw,sync,hard,nolock @@ -16,7 +16,7 @@ state: mounted fstype: nfs - name: Mount /tools - mount: + ansible.posix.mount: src: 10.10.1.1:/volume1/tools path: /tools opts: rw,sync,hard,nolock @@ -24,7 +24,7 @@ state: mounted fstype: nfs - name: Mount /0 - mount: + ansible.posix.mount: src: 10.10.1.1:/volume1/data path: /0 opts: rw,sync,hard,nolock @@ -32,7 +32,7 @@ state: mounted fstype: nfs - name: Mount /sge-root - mount: + ansible.posix.mount: src: 10.10.10.16:/sge-root path: /sge-root opts: rw,sync,hard @@ -40,7 +40,7 @@ state: mounted fstype: nfs - name: Mount /data_1 - mount: + ansible.posix.mount: src: 10.10.1.31:/volume1/data path: /data_1 opts: rw,sync,hard,nolock @@ -48,7 +48,7 @@ state: mounted fstype: nfs - name: Mount /web - mount: + ansible.posix.mount: src: 10.10.1.1:/volume1/web path: /web opts: rw,sync,hard,nolock diff --git a/yaml_sub/myrepo_clean.yaml b/yaml_sub/myrepo_clean.yaml index e896d4a..ed9c7f3 100644 --- a/yaml_sub/myrepo_clean.yaml +++ b/yaml_sub/myrepo_clean.yaml @@ -1,18 +1,19 @@ --- - name: Find files everything except myrepo.repo - find: + ansible.builtin.find: paths: /etc/yum.repos.d file_type: file excludes: "myrepo.repo" register: output + - name: Delete other files - file: + ansible.builtin.file: path: "{{ item.path }}" state: absent loop: "{{ output.files }}" - name: Check for marker line - lineinfile: + ansible.builtin.lineinfile: path: /etc/yum.repos.d/myrepo.repo create: true state: present @@ -20,7 +21,7 @@ register: marker_check - name: Delete file if marker is absent - file: + ansible.builtin.file: path: /etc/yum.repos.d/myrepo.repo state: absent when: marker_check.changed