All checks were successful
continuous-integration/drone/push Build is passing
43 lines
993 B
YAML
43 lines
993 B
YAML
---
|
|
# tasks file for roles/centos_mirror
|
|
|
|
# - ansible.builtin.include_role:
|
|
# name: httpd
|
|
|
|
- name: Instal update mirror script
|
|
ansible.builtin.copy:
|
|
src: "update_mirror.sh"
|
|
dest: "/usr/local/bin/update_mirror.sh"
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: Make the directory zone
|
|
ansible.builtin.file:
|
|
path: "/etc/yum-mirror.repo.d"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
|
|
- name: Instal update mirror script
|
|
ansible.builtin.copy:
|
|
src: "yum-mirror.repo.d/{{ item }}"
|
|
dest: "/etc/yum-mirror.repo.d/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
with_items:
|
|
- CentOS7-armv7hl.repo
|
|
- CentOS7-i686.repo
|
|
- CentOS7-x86_64.repo
|
|
- RedSleeve7-armv5tel.repo
|
|
- Springdale7-i386.repo
|
|
- yum.conf
|
|
|
|
- name: Ensure a cron job to run update_mirror.sh exists
|
|
ansible.builtin.cron:
|
|
name: "daily update_mirror"
|
|
special_time: daily
|
|
job: "/usr/local/bin/update_mirror.sh"
|
|
state: present
|