DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (2e5cf37deea0)

VCS Links

Line Code
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
---
- hosts: "{{ var_hostgroup | default('hgweb-mirrors') }}"
  tasks:
  - name: set SELinux to permissive mode
    selinux:
      policy: targeted
      state: permissive

  - name: apply hgweb role with replication filters
    include_role:
      name: hg-web
    vars:
      # We have to use hostvars to reference variables on other hosts.
      # slurp captures content in base64 encoded form. Decode it
      # before it is passed in.
      mirror_private_key: "{{ hostvars[groups['hgssh-prod-master'][0]].mirror_private_key.content | b64decode }}"
      mirror_host_key: "{{ hostvars[groups['hgssh-prod-master'][0]].mirror_host_key.content | b64decode }}"
      # The Zeus load balancer in MDC1 resolves to multiple IPs.
      mirror_ips: ["63.245.215.25", "63.245.215.102"]
      vct_node: "{{ lookup('file', '../.vctnode') }}"
      # Comment out these variables for now, since they are managed by
      # RelOps puppet and we don't need them on the mirror instances
#            chroot_mozbuild_exists: "{{ hostvars['localhost'].chroot_mozbuild.stat.exists }}"
#            bloxtool_user: "{{ (bloxtool_config.content | b64decode | from_json).user }}"
#            bloxtool_password: "{{ (bloxtool_config.content | b64decode | from_json).password }}"
#            bloxtool_url: "{{ (bloxtool_config.content | b64decode | from_json).url }}"
#            s3_cache_access_key_id: "{{ (s3cacher_config.content | b64decode | from_json).access_key_id }}"
#            s3_cache_secret_key: "{{ (s3cacher_config.content | b64decode | from_json).secret_access_key }}"
      replication_filters: True

  - name: apply monitoring-agent role
    include_role:
      name: monitoring-agent
    vars:
      hosttype: hgweb

  # TODO: refactor hg-web role so we don't install unnecessary services in the first place
  - name: turn off services considered irrelevant to mirror hosts
    service: name={{ item }}
             enabled=no
             state=stopped
    with_items:
      # These hosts will never serve to Mozilla offices, and don't
      # have bloxtool credentials. No need for them here.
      - mozilla-ip-scraper.service
      - mozilla-ip-scraper.timer