MM
Size: a a a
MM
NT
L
template:
...
vars:
ansible_connection: local
После либо передавать в роль путь до файлов. Либо использовать playbook_dir переменную для доступа к ним.NT
template:
...
vars:
ansible_connection: local
После либо передавать в роль путь до файлов. Либо использовать playbook_dir переменную для доступа к ним.Vr
[privilege_escalation]пример плэйбука:
become_user=root
become_ask_pass=False
- name: Install ApacheВыдает ошибку
hosts: all
tasks:
- name: Install Apache web-server
apt:
name: httpd
state: latest
Permission denied
и are you root?
PG
become: True
Vr
become: True
- name: Install Apache
hosts: all
become: true
{"msg": "Missing sudo password"}
.PG
Vr
PG
Vr
PG
PG
Vr
su -
apt install
PG
become: yes
become_method: su
Vr
become: yes
become_method: su
[privilege_escalation]
#become=True
#become_method=su
become_user=root
become_ask_pass=False
- name: Install Apache
hosts: all
become_method: su
tasks:
- name: Install Apache web-server
apt:
name: httpd
state: latest
become: yes
Vr
D