--- - name: Install httpd ansible.builtin.yum: name: httpd state: present - name: Install rsync ansible.builtin.yum: name: rsync state: present - name: Copy files-repo Directroy ansible.posix.synchronize: src: "{{ role_path }}/files/files_repo" dest: /var/www/html/ - name: Create httpd conf ansible.builtin.template: src: httpd.j2 dest: /etc/httpd/conf/httpd.conf - name: Create Local Repo File ansible.builtin.template: src: localrepo.j2 dest: /etc/yum.repos.d/localrepo.repo - name: Disable firewalld ansible.builtin.service: name: firewalld state: stopped enabled: false - name: Changing security context ansible.builtin.shell: | chcon -Rv --type=httpd_sys_content_t /var/www/html/files_repo chmod 711 /var/www/html/files_repo - name: Restart Local Repo Server ansible.builtin.service: name: httpd state: restarted - name: Repo Clean ansible.builtin.shell: | yum clean all