Nginx
- 1 ответ
- 0 вопросов
1
Вклад в тег
map $request_uri $loggable {
~_ajax 0;
default 1;
}
access_log /path/to/access.log combined if=$loggable;
ssh_users:
- name: pupkin
key: "{{ lookup('file', 'roles/authorized_keys/vars/pupkin.pub') }}"
servers:
- host1
- host2
state: present
- name: root
key: "{{ lookup('file', 'roles/authorized_keys/vars/guru.pub') }}"
servers:
- host1
- host2
state: present
- name: root
key: "{{ lookup('file', 'roles/authorized_keys/vars/user.pub') }}"
servers:
- host3
- host4
state: absent
- name: Add ssh key.
authorized_key: user="{{ item.name }}" key="{{ item.key }}" state="{{ item.state }}"
when: "inventory_hostname in item.servers"
with_items: "{{ ssh_users }}"