Use sudo instead of root
This commit is contained in:
parent
04799e4a8f
commit
1542b0faf0
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@ playbook.retry
|
|||
*.log
|
||||
.idea/
|
||||
venv/
|
||||
/ansible.cfg
|
||||
|
|
8
Makefile
8
Makefile
|
@ -1,4 +1,10 @@
|
|||
init: create_venv install_pre_commit install_ansible_galaxy_modules
|
||||
init: create_ansible_cfg create_venv install_pre_commit install_ansible_galaxy_modules
|
||||
|
||||
.ONESHELL:
|
||||
create_ansible_cfg:
|
||||
read -rp "Enter remote username: " REMOTE_USER
|
||||
cp ansible.cfg.sample ansible.cfg
|
||||
sed -i "s/REMOTE_USER/$$REMOTE_USER/g" ansible.cfg
|
||||
|
||||
create_venv:
|
||||
python3 -m venv venv
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[defaults]
|
||||
remote_user = root
|
||||
remote_user = REMOTE_USER
|
||||
inventory = datacoop_hosts
|
||||
use_persistent_connections = True
|
Loading…
Reference in a new issue