---

govuk::safe_to_reboot::can_reboot: 'no'
govuk::safe_to_reboot::reason: 'Mounted by backend machines, causes attachment delivery failures'

govuk_sudo::sudo_conf:
  deploy_assets_rsync:
    content: 'deploy ALL=(assets) NOPASSWD:/usr/bin/rsync --server -vlogDtprze.iLs --delete . /mnt/uploads'

lv:
  data:
    pv:
        - '/dev/sdb1'
        - '/dev/sdc1'
    vg: 'uploads'

mount:
  /mnt/uploads:
    disk: '/dev/mapper/uploads-data'
    govuk_lvm: 'data'
    mountoptions: 'defaults'
    percent_threshold_warning: 5
    percent_threshold_critical: 2

---

govuk::safe_to_reboot::can_reboot: 'no'
govuk::safe_to_reboot::reason: 'Mounted by backend machines, causes attachment delivery failures'

govuk_sudo::sudo_conf:
  deploy_assets_rsync:
    content: 'deploy ALL=(assets) NOPASSWD:/usr/bin/rsync --server -vlogDtprze.iLs --delete --ignore-errors . /mnt/uploads'

lv:
  data:
    pv:
        - '/dev/sdb1'
        - '/dev/sdc1'
    vg: 'uploads'

mount:
  /mnt/uploads:
    disk: '/dev/mapper/uploads-data'
    govuk_lvm: 'data'
    mountoptions: 'defaults'
    percent_threshold_warning: 5
    percent_threshold_critical: 2

Update sudoers on asset-master-1 for rsync changes
Update sudoers on asset-master-1 for rsync changes

Update the suoders config to match a change in options we're passing to
rsync in the env-sync-and-backup repository:

https://github.gds/gds/env-sync-and-backup/commit/cf0f6934b23742b88326396a72d55fac0ec8cbd2

Without this change, rsync fails during the sync job with:

    2015-12-07T09:45:10Z: [assets] Sourcing config files
    2015-12-07T09:45:10Z: [assets] Synchronising Whitehall Assets to preview
    2015-12-07T09:45:11Z: [assets] + SSH_OPTS='-o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o VisualHostKey=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -A'
    2015-12-07T09:45:11Z: [assets] + rsync --exclude=lost+found --exclude=.cache --delete --ignore-errors --chmod=ug=rwX '--rsync-path=sudo -u assets rsync' -avze 'ssh -o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o VisualHostKey=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -A -o ProxyCommand='''ssh -o ServerAliveCountMax=5 -o ServerAliveInterval=30 -o VisualHostKey=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null -A jumpbox.preview.alphagov.co.uk exec nc -w 90 %h %p'''' /mnt/uploads/ deploy@asset-master-1.backend:/mnt/uploads
    2015-12-07T09:45:12Z: [assets] sudo: no tty present and no askpass program specified
    2015-12-07T09:45:12Z: [assets] Sorry, try again.
    2015-12-07T09:45:12Z: [assets] sudo: no tty present and no askpass program specified
    2015-12-07T09:45:12Z: [assets] Sorry, try again.
    2015-12-07T09:45:12Z: [assets] sudo: no tty present and no askpass program specified
    2015-12-07T09:45:12Z: [assets] Sorry, try again.
    2015-12-07T09:45:12Z: [assets] sudo: 3 incorrect password attempts
    2015-12-07T09:45:12Z: [assets] rsync: connection unexpectedly closed (0 bytes received so far) [sender]
    2015-12-07T09:45:12Z: [assets] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.0]
    2015-12-07T09:45:12Z: [assets] JOB FAILURE
