Skip to content

Commit e6e6e9c

Browse files
committed
Troubleshooting: ansible.builtin.user
1 parent 8d3261f commit e6e6e9c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ansible/bootstrap.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@
8888
when:
8989
- item.enable | default(true) | bool
9090
- "'group' in item"
91-
become_method: "ansible.builtin.sudo"
91+
become_method: ansible.builtin.sudo
9292
# Need to change working directory otherwise we try to switch back to non-existent directory.
9393
become_flags: "-i"
9494
- name: Add system users
9595
ansible.builtin.user:
9696
name: "{{ item.user }}"
9797
loop: "{{ appliances_local_users }}"
9898
when: item.enable | default(true) | bool
99-
become_method: "ansible.builtin.sudo"
99+
become_method: ansible.builtin.sudo
100100
# Need to change working directory otherwise we try to switch back to non-existent directory.
101101
become_flags: "-i"
102102
- name: Reset ssh connection to allow user changes to affect ansible_user

environments/.caas/hooks/pre.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
- name: Set up Ansible user
4444
ansible.builtin.user:
4545
name: "{{ (appliances_local_users_default | selectattr('user.name', 'eq', appliances_local_users_ansible_user_name))[0]['user'] }}"
46-
become_method: "ansible.builtin.sudo"
46+
become_method: ansible.builtin.sudo
4747
# Need to change working directory otherwise we try to switch back to non-existent directory.
4848
become_flags: "-i"
4949
become: true
@@ -53,6 +53,7 @@
5353
tasks:
5454
- name: Reset persistent SSH connections
5555
ansible.builtin.meta: reset_connection
56+
5657
- hosts: localhost
5758
gather_facts: false
5859
become: false

0 commit comments

Comments
 (0)