--- # CentOS related tasks #- name: Prep OS... Create tmp directory # file: # path: "{{ item }}" # state: directory # owner: "{{ ansible_user }}" # mode: 0770 # with_items: # - "/tmp/ansible_{{ ansible_user }}" # #- name: Prep OS... Set remote tmp # set_fact: # ansible_remote_tmp: "/tmp/ansible_{{ ansible_user }}" - name: Prep OS... add rpmfusion-free-release centos{{ ansible_distribution_major_version|int }} repo dnf: name: https://download1.rpmfusion.org/free/el/rpmfusion-free-release-{{ ansible_distribution_major_version|int }}.noarch.rpm disable_gpg_check: yes validate_certs: no state: latest when: not debug_speed_check - name: Prep OS... import key from Collabora centos{{ ansible_distribution_major_version|int }} repo ansible.builtin.rpm_key: state: present key: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos{{ ansible_distribution_major_version|int }}/repodata/repomd.xml.key when: nc_collabora - name: Prep OS... add Collabora repos centos{{ ansible_distribution_major_version|int }} repo ansible.builtin.yum_repository: name: collabora description: Collabora Online CODE repo baseurl: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-centos{{ ansible_distribution_major_version|int }} when: nc_collabora - name: Prep OS... install Collabora packages dnf: name: - coolwsd - CODE-brand - inotify-tools - psmisc - perl state: latest when: nc_collabora - name: Prep OS... update os dnf: name: '*' update_cache: true state: latest when: not debug_speed_check - name: Prep OS... install needed packages dnf: name: - libreoffice - ffmpeg - mariadb state: latest enablerepo: epel when: not debug_speed_check - name: Prep OS... Ensure Apache is installed on {{ ansible_facts['distribution'] }} dnf: name: httpd state: present when: nextcloud_websrv in ["apache", "apache2"] - name: Prep OS... Set http env on {{ ansible_facts['distribution'] }} set_fact: http_service_name: httpd http_webroot: /var/www/html nextcloud_websrv_user: apache nextcloud_websrv_group: apache when: nextcloud_websrv in ["apache", "apache2"] - name: Prep OS... Generate Nextcloud configuration for apache template: dest: /etc/httpd/conf.d/nextcloud.conf src: nextcloud_apache2.j2 mode: 0640 when: nextcloud_websrv in ["apache", "apache2"] - name: Prep OS... Allow http to listen on tcp port 8000 seport: ports: 8000 proto: tcp setype: http_port_t state: present #- name: Prep OS... semanage port # command: semanage port -m -t http_port_t -p tcp {{ item }} # loop: # - "8000" - name: Prep OS... Start {{ http_service_name }} service service: name: "{{ http_service_name }}" state: started