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
Pipeline #4206 failed
...@@ -27,7 +27,3 @@ tinyproxy_filtering: ...@@ -27,7 +27,3 @@ tinyproxy_filtering:
extended: "On" extended: "On"
default_deny: "On" default_deny: "On"
case_sensitive: "Off" 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 - name: restart tinyproxy
become: "yes"
service: service:
name: tinyproxy name: tinyproxy
state: restarted state: restarted
...@@ -9,7 +9,5 @@ galaxy_info: ...@@ -9,7 +9,5 @@ galaxy_info:
- name: CentOS - name: CentOS
versions: versions:
- 7 - 7
dependencies: [] dependencies:
# List your role dependencies here, one per line. - ics-ans-role-repository
# Be sure to remove the '[]' above if you add dependencies
# to this list.
- 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 - name: Install tinyproxy
become: "yes"
yum: yum:
name: tinyproxy name: tinyproxy
state: present state: present
- name: Copy 400 error html files - 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: template:
src: ../templates/403.html src: "{{ item }}"
dest: /usr/share/tinyproxy/403.html dest: "/usr/share/tinyproxy/{{ item }}"
with_items:
- name: Copy 404 error html files - 400.html
become: "yes" - 403.html
template: - 404.html
src: ../templates/404.html - 503.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
- name: Create url filter file for tinyproxy - 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: template:
src: ../templates/tinyproxy.conf.j2 src: "{{ item }}"
dest: /etc/tinyproxy/tinyproxy.conf dest: "/etc/tinyproxy/{{ item }}"
with_items:
- filter
- tinyproxy.conf
notify: notify:
- restart tinyproxy - restart tinyproxy
- name: Test that tinyproxy is up - name: Test that tinyproxy is up
become: "yes"
service: service:
enabled: "yes" enabled: "yes"
name: tinyproxy 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