Skip to content
Snippets Groups Projects
Commit b078f60c authored by Remy Mudingay's avatar Remy Mudingay :speech_balloon:
Browse files

cleanup of role - epel repo points to artifactory and merging of tasks

parent 8a9b190e
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,3 @@ tinyproxy_filtering:
extended: "On"
default_deny: "On"
case_sensitive: "Off"
epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"
epel_repo_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_distribution_major_version }}"
epel_repofile_path: "/etc/yum.repos.d/epel.repo"
---
- name: restart tinyproxy
become: "yes"
service:
name: tinyproxy
state: restarted
......@@ -9,7 +9,5 @@ galaxy_info:
- name: CentOS
versions:
- 7
dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.
dependencies:
- ics-ans-role-repository
- src: git+https://gitlab.esss.lu.se/ics-ansible-galaxy/ics-ans-role-repository.git
---
- name: Check if EPEL repo is already configured.
stat:
path: "{{ epel_repofile_path }}"
register: epel_repofile_result
- name: Install EPEL repo.
yum:
name: "{{ epel_repo_url }}"
state: present
register: result
when: not epel_repofile_result.stat.exists
- name: Import EPEL GPG key.
rpm_key:
key: "{{ epel_repo_gpg_key_url }}"
state: present
when: not epel_repofile_result.stat.exists
- name: Install tinyproxy
become: "yes"
yum:
name: tinyproxy
state: present
- name: Copy 400 error html files
become: "yes"
template:
src: ../templates/400.html
dest: /usr/share/tinyproxy/400.html
- name: Copy 403 error html files
become: "yes"
template:
src: ../templates/403.html
dest: /usr/share/tinyproxy/403.html
- name: Copy 404 error html files
become: "yes"
template:
src: ../templates/404.html
dest: /usr/share/tinyproxy/404.html
- name: Copy 503 error html files
become: "yes"
template:
src: ../templates/503.html
dest: /usr/share/tinyproxy/503.html
src: "{{ item }}"
dest: "/usr/share/tinyproxy/{{ item }}"
with_items:
- 400.html
- 403.html
- 404.html
- 503.html
- name: Create url filter file for tinyproxy
become: "yes"
template:
src: ../templates/filter.j2
dest: /etc/tinyproxy/filter
notify:
- restart tinyproxy
- name: Setup configuration file for tinyproxy
become: "yes"
template:
src: ../templates/tinyproxy.conf.j2
dest: /etc/tinyproxy/tinyproxy.conf
src: "{{ item }}"
dest: "/etc/tinyproxy/{{ item }}"
with_items:
- filter
- tinyproxy.conf
notify:
- restart tinyproxy
- name: Test that tinyproxy is up
become: "yes"
service:
enabled: "yes"
name: tinyproxy
......
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment