Skip to content

Commit

Permalink
PMM-7 Fix user for OL9 OVF (#2319) (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
talhabinrizwan authored Jun 28, 2023
1 parent c6a33db commit 4224035
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions build/ansible/roles/cloud-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,23 @@
regexp: "name: centos"
replace: "name: admin"

- name: change cloud user EL9 | Change cloud user
when: create_admin == "true" and (ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux') and ansible_distribution_major_version == '9'
- name: change cloud user for OVF EL9 | Change cloud user
when:
- create_admin == "true"
- ansible_virtualization_type == "virtualbox"
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'
replace:
dest: /etc/cloud/cloud.cfg
regexp: "name: cloud-user"
replace: "name: admin"

- name: change cloud user for AMI EL9 | Change cloud user
when:
- create_admin == "true"
- ansible_virtualization_type != "virtualbox"
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'
replace:
dest: /etc/cloud/cloud.cfg.d/00_ol-default-user.cfg
regexp: "name: ec2-user"
Expand Down

0 comments on commit 4224035

Please sign in to comment.