diff --git a/handlers/main.yml b/handlers/main.yml index ed6957e..53fcf81 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,10 +1,10 @@ --- - name: restart_kojira - service: + ansible.builtin.service: name: kojira state: restarted - name: restart_httpd - service: + ansible.builtin.service: name: httpd state: restarted diff --git a/meta/main.yml b/meta/main.yml index 8c079d6..b86b254 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -9,4 +9,6 @@ galaxy_info: versions: - 8 galaxy_tags: [] -dependencies: [] +dependencies: + - ansible.posix + - community.general diff --git a/tasks/db.yml b/tasks/db.yml index f78ccd0..b1d99e3 100644 --- a/tasks/db.yml +++ b/tasks/db.yml @@ -1,7 +1,7 @@ --- # Note: We do not install postgresql. It's up to you to do so, whether locally or not. - name: Template for koji admin and kojira - template: + ansible.builtin.template: src: koji-pgsql.sql.j2 dest: /var/tmp/koji-pgsql.sql mode: '0644' diff --git a/tasks/koji-admin-ipa.yml b/tasks/koji-admin-ipa.yml index 1f22276..445b924 100644 --- a/tasks/koji-admin-ipa.yml +++ b/tasks/koji-admin-ipa.yml @@ -1,7 +1,7 @@ --- # Setup the IPA service account - name: Create koji config directory - file: + ansible.builtin.file: path: "/home/{{ koji_admin_user }}/.koji" state: directory owner: "{{ koji_admin_user }}" @@ -10,7 +10,7 @@ recurse: true - name: Reset permissions - file: + ansible.builtin.file: path: "/home/{{ koji_admin_user }}" state: directory owner: "{{ koji_admin_user }}" @@ -18,7 +18,7 @@ mode: '0700' - name: Configure the koji client - template: + ansible.builtin.template: src: koji-client-config.j2 dest: "/home/{{ koji_admin_user }}/.koji/config" owner: "{{ koji_admin_user }}" @@ -26,7 +26,7 @@ mode: '0644' - name: Ensuring we have our scripts store - file: + ansible.builtin.file: path: /opt/rocky-tools/scripts state: directory owner: "{{ koji_admin_user }}" diff --git a/tasks/koji-admin-local.yml b/tasks/koji-admin-local.yml index 5dba89c..a19587f 100644 --- a/tasks/koji-admin-local.yml +++ b/tasks/koji-admin-local.yml @@ -1,12 +1,12 @@ --- # Create the koji admin user - name: Create local koji admin user - user: + ansible.builtin.user: name: "{{ koji_admin_localuser_name }}" comment: "Local Koji Admin" - name: Create koji config directory - file: + ansible.builtin.file: path: "/home/{{ koji_admin_localuser_name }}/.koji" state: directory owner: "{{ koji_admin_localuser_name }}" @@ -15,7 +15,7 @@ recurse: true - name: Reset permissions - file: + ansible.builtin.file: path: "/home/{{ koji_admin_localuser_name }}" state: directory owner: "{{ koji_admin_localuser_name }}" @@ -23,7 +23,7 @@ mode: '0700' - name: Configure the koji client - template: + ansible.builtin.template: src: koji-client-config.j2 dest: "/home/{{ koji_admin_localuser_name }}/.koji/config" owner: "{{ koji_admin_localuser_name }}" @@ -31,7 +31,7 @@ mode: '0644' - name: Ensuring we have our scripts store - file: + ansible.builtin.file: path: /opt/rocky-tools/scripts state: directory owner: "{{ koji_admin_localuser_name }}" diff --git a/tasks/koji-gc.yml b/tasks/koji-gc.yml index b170f24..7052360 100644 --- a/tasks/koji-gc.yml +++ b/tasks/koji-gc.yml @@ -1,7 +1,7 @@ --- # Configure gc - name: Configure garbage collector - template: + ansible.builtin.template: src: etc/koji-gc/koji-gc.conf.j2 dest: /etc/koji-gc/koji-gc.conf owner: root @@ -9,6 +9,6 @@ mode: '0644' - name: Enable the gc timer - service: + ansible.builtin.service: name: koji-gc.timer enabled: true diff --git a/tasks/kojira.yml b/tasks/kojira.yml index cccab22..64fad36 100644 --- a/tasks/kojira.yml +++ b/tasks/kojira.yml @@ -1,7 +1,7 @@ --- # Kojira - name: Configure kojira - template: + ansible.builtin.template: src: etc/kojira/kojira.conf.j2 dest: /etc/kojira/kojira.conf mode: '0644' @@ -9,7 +9,7 @@ - restart_kojira - name: Ensure kojira is running - service: + ansible.builtin.service: name: kojira state: started enabled: yes diff --git a/tasks/main.yml b/tasks/main.yml index 84dc7fd..4c91d64 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -9,7 +9,7 @@ import_tasks: storage.yml - name: Install required packages - yum: + ansible.builtin.dnf: name: "{{ koji_hub_packages }}" state: present @@ -25,7 +25,7 @@ when: koji_hub_plugins - name: Configure kojihub and web - template: + ansible.builtin.template: src: "{{ item }}.j2" dest: "/{{ item }}" mode: '0644' @@ -41,7 +41,7 @@ import_tasks: kojira.yml - name: Configure httpd for hub and web - template: + ansible.builtin.template: src: "etc/httpd/conf.d/{{ item }}.j2" dest: "/etc/httpd/conf.d/{{ item }}" mode: '0644' @@ -54,7 +54,7 @@ - restart_httpd - name: Configure robots.txt - copy: + ansible.builtin.copy: src: "var/www/html/robots.txt" dest: "/var/www/html/robots.txt" owner: root @@ -64,7 +64,7 @@ - restart_httpd - name: Deploy custom theme for koji - unarchive: + ansible.builtin.unarchive: src: "{{ koji_theme_file }}" dest: / when: koji_theme diff --git a/tasks/plugins.yml b/tasks/plugins.yml index c64696e..4c2bf0d 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -1,14 +1,14 @@ --- # Plugins - name: Deploying enabled plugins - copy: + ansible.builtin.copy: src: "plugins/{{ item }}.py" dest: "/usr/lib/koji-hub-plugins/{{ item }}.py" mode: 0755 with_items: "{{ koji_hub_plugins_list }}" - name: Configuring enabled plugins - template: + ansible.builtin.template: src: "etc/koji-hub/plugins/{{ item }}.conf.j2" dest: "/etc/koji-hub/plugins/{{ item }}.conf" mode: 0644 diff --git a/tasks/storage.yml b/tasks/storage.yml index d3b1b7d..d8f80e5 100644 --- a/tasks/storage.yml +++ b/tasks/storage.yml @@ -1,7 +1,7 @@ --- # Storage - name: Ensure the koji mountpoint exists - file: + ansible.builtin.file: path: "{{ koji_mount }}" state: directory owner: '48' @@ -9,7 +9,7 @@ mode: '0755' - name: Mount the NFS store - mount: + ansible.builtin.mount: path: "{{ koji_mount }}" src: "{{ koji_nfs_path }}" fstype: nfs @@ -17,7 +17,7 @@ when: koji_nfs - name: Create required default directories - file: + ansible.builtin.file: path: "{{ koji_mount }}/{{ item }}" state: directory owner: '48'