zuul-jobs/roles/intercept-job/tasks/wait.yaml
Ian Wienand f76cfbab11 linters: fix spaces between filters
This fixes a number of places where we do not have spaces between
filters.  I think that this is a reasonable rule for readability (I
also think it probably was enforced, but maybe later versions got
better at detecting it?).

These are detected by a later version of Ansible lint; this change
should have no operational change to any roles but prepares us to
update in a follow-on change.

Change-Id: I07e1a109b87adce86f483d14d7e02fcecb8313d5
2022-07-27 17:13:39 +10:00

29 lines
669 B
YAML

- name: Slurp it
slurp:
path: "{{ intercept_job_pub_key_path }}"
register: intercept_key
- name: Add to current user
authorized_key:
key: "{{ intercept_key.content | b64decode }}"
user: "{{ ansible_user }}"
- name: Inform user of connection details
debug:
msg: "ssh {{ ansible_ssh_user }}@{{ ansible_ssh_host }}"
- name: Copy waiter script
copy:
src: waiter.sh
dest: ./waiter.sh
mode: "0755"
- name: Start waiter task
command: ./waiter.sh {{ intercept_job_stop_path }}
- name: Remove key from current user
authorized_key:
key: "{{ intercept_key.content | b64decode }}"
user: "{{ ansible_user }}"
state: absent