Add files via upload
This commit is contained in:
parent
fca4dce088
commit
ddc4d0297d
3 changed files with 16 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue