diff --git a/tools/playbooks/multinode_setup/common_config.yaml b/tools/playbooks/multinode_setup/common_config.yaml index 15a000260d..a81f449e3b 100644 --- a/tools/playbooks/multinode_setup/common_config.yaml +++ b/tools/playbooks/multinode_setup/common_config.yaml @@ -69,7 +69,7 @@ - hosts: test-runner tasks: - name: add new env. variable for running tests - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/home/{{ ansible_ssh_user}}/test.conf" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/home/{{ ansible_user}}/test.conf" - name: copy the sample configuration files for running tests - template: src=test.conf.j2 dest=/home/{{ ansible_ssh_user }}/test.conf + template: src=test.conf.j2 dest=/home/{{ ansible_user }}/test.conf diff --git a/tools/playbooks/multinode_setup/make_rings.yaml b/tools/playbooks/multinode_setup/make_rings.yaml index 6eda38dc5a..b2ef444ff1 100644 --- a/tools/playbooks/multinode_setup/make_rings.yaml +++ b/tools/playbooks/multinode_setup/make_rings.yaml @@ -126,20 +126,20 @@ when: previous_swift_version | default(latest_swift_release.stdout) is not match("^(rocky|stein|train|ussuri)-em.*|^2\.(1?[0-9]|2[0-5])\.|^(origin/)?stable/[a-u].*") - name: create remakerings from template - template: src=make_multinode_rings.j2 dest=/home/{{ ansible_ssh_user }}/make_multinode_rings mode=0755 + template: src=make_multinode_rings.j2 dest=/home/{{ ansible_user }}/make_multinode_rings mode=0755 - name: create rings dir file: > - path=/home/{{ ansible_ssh_user }}/rings + path=/home/{{ ansible_user }}/rings state=directory - name: make rings shell: - cmd: /home/{{ ansible_ssh_user }}/make_multinode_rings + cmd: /home/{{ ansible_user }}/make_multinode_rings executable: /bin/bash - name: scp rings to all swift-cluster nodes - command: scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o ConnectionAttempts=360 /home/{{ ansible_ssh_user }}/rings/{{ item[0] }} {{ ansible_ssh_user }}@{{ hostvars[item[1]].nodepool.public_ipv4 }}:/etc/swift + command: scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o ConnectionAttempts=360 /home/{{ ansible_user }}/rings/{{ item[0] }} {{ ansible_user }}@{{ hostvars[item[1]].nodepool.public_ipv4 }}:/etc/swift with_nested: - ['account.ring.gz', 'container.ring.gz', 'object.ring.gz', 'object-1.ring.gz', 'object-2.ring.gz'] - "{{ groups['swift-cluster'] }}" diff --git a/tools/playbooks/multinode_setup/run.yaml b/tools/playbooks/multinode_setup/run.yaml index 072b157cc4..5ea82fa31c 100644 --- a/tools/playbooks/multinode_setup/run.yaml +++ b/tools/playbooks/multinode_setup/run.yaml @@ -40,4 +40,4 @@ tox_envlist: func-py3 tox_environment: TOX_CONSTRAINTS_FILE: https://releases.openstack.org/constraints/upper/yoga - SWIFT_TEST_CONFIG_FILE: /home/{{ ansible_ssh_user }}/test.conf + SWIFT_TEST_CONFIG_FILE: /home/{{ ansible_user }}/test.conf diff --git a/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 b/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 index c1e05a83b4..fdb9b27352 100755 --- a/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 +++ b/tools/playbooks/multinode_setup/templates/make_multinode_rings.j2 @@ -2,7 +2,7 @@ set -e -cd /home/{{ ansible_ssh_user }}/rings +cd /home/{{ ansible_user }}/rings rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz diff --git a/tools/playbooks/saio_single_node_setup/setup_saio.yaml b/tools/playbooks/saio_single_node_setup/setup_saio.yaml index c78cefda70..5353be184f 100644 --- a/tools/playbooks/saio_single_node_setup/setup_saio.yaml +++ b/tools/playbooks/saio_single_node_setup/setup_saio.yaml @@ -161,22 +161,22 @@ create: no - name: copy the SAIO scripts for resetting the environment - command: cp -r {{ zuul.project.src_dir }}/doc/saio/bin /home/{{ ansible_ssh_user }}/bin creates=/home/{{ ansible_ssh_user }}/bin + command: cp -r {{ zuul.project.src_dir }}/doc/saio/bin /home/{{ ansible_user }}/bin creates=/home/{{ ansible_user }}/bin - name: set the correct file mode for SAIO scripts - file: dest=/home/{{ ansible_ssh_user }}/bin mode=0777 recurse=yes + file: dest=/home/{{ ansible_user }}/bin mode=0777 recurse=yes - name: add new env. variable for loopback device - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export SAIO_BLOCK_DEVICE=/srv/swift-disk" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export SAIO_BLOCK_DEVICE=/srv/swift-disk" - name: remove line from resetswift - lineinfile: dest=/home/{{ ansible_ssh_user }}/bin/resetswift line="sudo find /var/log/swift -type f -exec rm -f {} \;" state=absent + lineinfile: dest=/home/{{ ansible_user }}/bin/resetswift line="sudo find /var/log/swift -type f -exec rm -f {} \;" state=absent - name: add new env. variable for running tests - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf" - name: make sure PATH includes the bin directory - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="export PATH=${PATH}:/home/{{ ansible_ssh_user }}/bin" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="export PATH=${PATH}:/home/{{ ansible_user }}/bin" - name: increase open files limit to run probe tests - lineinfile: dest=/home/{{ ansible_ssh_user }}/.bashrc line="ulimit -n 4096" + lineinfile: dest=/home/{{ ansible_user }}/.bashrc line="ulimit -n 4096"