forked from playingfield/clusterlust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preparation.yml
executable file
·53 lines (45 loc) · 1.11 KB
/
preparation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env ansible-playbook
---
- name: Disable firewall
hosts: k8s_cluster:proxy
become: true
gather_facts: false
pre_tasks:
- name: Disable firewalld
ansible.builtin.systemd:
name: firewalld
state: stopped
enabled: false
- name: Install squid on proxy host
hosts: proxy
become: true
gather_facts: false
tasks:
- name: Gathering facts
ansible.builtin.setup:
gather_subset: platform
- name: Install docker-ce
ansible.builtin.import_role:
name: geerlingguy.docker
tags: [docker]
- name: Install Squid proxy
ansible.builtin.import_role:
name: proxy
tags: [proxy]
- name: Enable proxy
hosts: k8s_cluster
become: true
gather_facts: false
tags: [proxy]
tasks:
- name: Fix dnf
ansible.builtin.lineinfile:
path: /etc/dnf/dnf.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
state: present
loop:
- regexp: '^proxy='
line: "proxy={{ http_proxy | default('') }}"
- regexp: '^repo_gpgcheck='
line: 'repo_gpgcheck=0'