mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-26 14:07:21 +00:00
Add dns record for choco server to proxy
This commit is contained in:
1 parent
85b4db3d04
commit
93022add31
4 files changed
+21
-1
No files matched your search
@@ -0,0 +1,8 @@
|
||||
---
|
||||
|
||||
- name: Create chocolatey server dns record
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '{{ choco_hostname }}$'
|
||||
line: "{{ hostvars[choco_server].ansible_host }} {{ choco_hostname }}"
|
||||
state: present
|
||||
@@ -6,6 +6,10 @@
|
||||
run_once: true
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Import dns.yml
|
||||
import_tasks:
|
||||
file: dns.yml
|
||||
|
||||
- name: Create group
|
||||
ansible.builtin.group:
|
||||
name: "{{ squid_group }}"
|
||||
|
||||
@@ -21,4 +21,7 @@ squid_allowed_domain_file: allowed_domains.acl
|
||||
|
||||
squid_config_file: squid.conf
|
||||
|
||||
squid_service: squid
|
||||
squid_service: squid
|
||||
|
||||
choco_server: "{{ os_project }}-{{ win_project }}-choc"
|
||||
choco_hostname: "{{ win_project }}-choc.{{ win_project }}.loc"
|
||||
@@ -14,6 +14,9 @@ squid_acls:
|
||||
- name: agent_dl
|
||||
classifier: dst
|
||||
value: "{{ checkmk_server }}/32"
|
||||
- name: choco
|
||||
classifier: dstdomain
|
||||
value: "{{ win_project }}-choc.{{ win_project }}.loc"
|
||||
- name: allowed_domains
|
||||
classifier: dstdomain
|
||||
value: "\"{{ squid_config_directory }}/{{ squid_allowed_domain_file }}\""
|
||||
@@ -29,6 +32,8 @@ squid_rules:
|
||||
decision: allow
|
||||
- acl: agent_dl
|
||||
decision: allow
|
||||
- acl: choco
|
||||
decision: allow
|
||||
- acl: localhost allowed_domains
|
||||
decision: allow
|
||||
- acl: all
|
||||
|
||||
Reference in new issue
Block a user