Answer the question
In order to leave comments, you need to log in
Do you need root for ansible?
Good day!
I'm starting to use ansible and I can't understand the essence of privilege escalation for administering systems through playbooks on ansible. In short, do I need a root account on the systems I'm going to configure with ansible?
1. If not, then poke your nose at the sudo example of the same user who connects via ssh to configure the system, because this user is in the sudo (wheel) group and can administer systems.
2. If so, how to enable the root account USING ANSIBLE on systems where the root account is disabled? After all, to enable root, you need privilege escalation, and privileges are elevated using the root account, and it is disabled, and to enable it ... well, you understand me.
Answer the question
In order to leave comments, you need to log in
You need to specify ONLY the following variables:
ansible_connection=ssh
ansible_ssh_user=user
ansible_ssh_pass=user
ansible_become=yes
ansible_become_method=sudo
sudo user is needed, not necessarily root
https://docs.ansible.com/ansible/2.5/user_guide/be...- become
2. If so, how to enable the root account USING ANSIBLE on systems where the root account is disabled? After all, to enable root, you need privilege escalation, and privileges are elevated using the root account, and it is disabled, and to enable it ... well, you understand me.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question