message: inject clustertype in usernames
diff: serial: 1
  vars:
  username: lagoon
  - command: rsh ci-drupal-drush-first env
  + command: rsh ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first env
  expected_content: LAGOON_PROJECT=ci-drupal
  tasks:
  - include: ../../tasks/ssh/ssh-command.yaml
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: env
  expected_content: LAGOON=cli-drupal
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: service=nginx container=php env
  expected_content: LAGOON=php
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: drush sa
  expected_content: "@drush-second"
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: drush @drush-second -y cset system.site name "CHANGED-{{ random_number }}"
  expected_content: ""
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: drush @drush-second -y cget system.site name
  expected_content: "CHANGED-{{ random_number }}"
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: drush -y sql-sync @drush-second @self
  expected_content: ""
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-drush-first
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-drush-first
  command: drush -y cget system.site name
  expected_content: "CHANGED-{{ random_number }}"
  tasks:
  hosts: localhost
  serial: 1
  vars:
  - username: ci-drupal-foo-bar
  + username: ci-drupal-{{ lookup('env','CLUSTER_TYPE') }}-foo-bar
  command: drush @foo-bar ssh echo zzyzx
  expected_content: "zzyzx"
  tasks:
  