Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ansible/playbooks/registration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
remote_user: cloudadmin
become: true
become_user: root
gather_facts: false
environment:
ZYPP_LOCK_TIMEOUT: '120'

Expand All @@ -13,6 +14,20 @@
tasks:

# Pre flight checks
- name: Wait until passwordless sudo works in GCP
become: false # This task is to check sudo is ready
ansible.builtin.command: sudo -n true
register: sudo_test
retries: 30
delay: 5
until: sudo_test.rc == 0
changed_when: false
failed_when: sudo_test.rc != 0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound sequential more than declarative.
Can we restrict it to GCP only?
I do not feel comfortable to disable gathering only to manually re-enable it later on, what if anything went wrong?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1


- name: Gather facts (manually, after sudo is ready)
ansible.builtin.setup:
changed_when: false

- name: Check for instance-flavor-check presence
ansible.builtin.command: which instance-flavor-check
register: ifc_bin
Expand Down