main.yml 756 Bytes
Newer Older
1 2
---

3 4 5
  - name: Copy hosts file.
    template: src=hosts.j2 dest=/etc/hosts backup=no owner=root mode=0750

6 7 8
  - name: Install squid http proxy
    apt: name=squid3 state=latest
    tags: install
9

10
  - name: Configure squid http proxy
11
    lineinfile: destfile="/etc/squid3/squid.conf" regexp="^acl localnet" insertafter="^#acl localnet"
12
                line="acl localnet src {{ hostvars[groups['all'][0]]['local_net'] }}"
13
                state=present
14 15
    notify:
    - restart squid3
16
    tags: config
17 18

  - name: Configure squid http proxy
19 20 21
    lineinfile: destfile="/etc/squid3/squid.conf" regexp="^#http_access allow localnet"
                line="http_access allow localnet"
                state=present
22 23
    notify:
    - restart squid3
24
    tags: config