From 9a22eecedc8e70e7df4f0936ee74d574a2f24311 Mon Sep 17 00:00:00 2001 From: Adrien Reslinger Date: Tue, 16 Aug 2022 15:53:56 +0200 Subject: [PATCH] Update ansible code --- defaults/main.yml | 2 +- handlers/main.yml | 2 +- meta/main.yml | 22 ++++++++++++---------- tasks/main.yml | 10 +++++----- vars/main.yml | 2 +- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 72c2570..62c889a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,2 +1,2 @@ --- -# defaults file for roles/centos_mirror \ No newline at end of file +# defaults file for roles/centos_mirror diff --git a/handlers/main.yml b/handlers/main.yml index 041a143..487350a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,2 +1,2 @@ --- -# handlers file for roles/centos_mirror \ No newline at end of file +# handlers file for roles/centos_mirror diff --git a/meta/main.yml b/meta/main.yml index 9ebd37f..20c8f16 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -27,7 +27,7 @@ galaxy_info: # this branch. If Travis integration is configured, only notifications for this # branch will be accepted. Otherwise, in all cases, the repo's default branch # (usually master) will be used. - #github_branch: + # github_branch: # # platforms is a list of platforms, and each platform has a name and a list of versions. @@ -43,14 +43,16 @@ galaxy_info: # - 1.0 # - 7 # - 99.99 - - name: CentOS - version: - - 7 - - 8 - - name: RedHat - version: - - 7 - - 8 + - name: CentOS + version: + - 7 + - 8 + - 9 + - name: RedHat + version: + - 7 + - 8 + - 9 galaxy_tags: [] # List tags for your role here, one per line. A tag is a keyword that describes @@ -62,4 +64,4 @@ galaxy_info: dependencies: [] # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. \ No newline at end of file + # if you add dependencies to this list. diff --git a/tasks/main.yml b/tasks/main.yml index a6075f0..d9fcf5b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,11 +1,11 @@ --- # tasks file for roles/centos_mirror -#- include_role: +#- ansible.builtin.include_role: # name: httpd - name: Instal update mirror script - copy: + ansible.builtin.copy: src: "update_mirror.sh" dest: "/usr/local/bin/update_mirror.sh" owner: root @@ -13,7 +13,7 @@ mode: 0755 - name: Make the directory zone - file: + ansible.builtin.file: path: "/etc/yum-mirror.repo.d" state: directory owner: root @@ -21,7 +21,7 @@ mode: 0755 - name: Instal update mirror script - copy: + ansible.builtin.copy: src: "yum-mirror.repo.d/{{ item }}" dest: "/etc/yum-mirror.repo.d/{{ item }}" owner: root @@ -36,7 +36,7 @@ - yum.conf - name: Ensure a cron job to run update_mirror.sh exists - cron: + ansible.builtin.cron: name: "daily update_mirror" special_time: daily job: "/usr/local/bin/update_mirror.sh" diff --git a/vars/main.yml b/vars/main.yml index 2a7a529..47d808d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,2 +1,2 @@ --- -# vars file for roles/centos_mirror \ No newline at end of file +# vars file for roles/centos_mirror