Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: vdu
- tasks:
- - name: setting up the ssh key
- authorized_key:
- user: root
- key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiHXGg3H4cLDoFJK22wpVQlj8Kfe8Ab7jSkl8UbdRCjSWEL0fxR2Tm+ORLTWgEMOKbNJgrrvcMdUwDxTSED0UTsRSlqj5F6EyNrW3RrwIagqvvfLZIf3LfipFRm6K2XKgNnwbsGLhVCXiunfUErb96K0vy4UwE4LBkE+WNTTFBZiSNxwKS1QCeMjDzts58oRzwVRt8litSGvt8v11+1rpsgyhWnv9M9DiFdJhQh9LPD3IcmhtA+La796jA/aXczsybp1i1JhQfjw1OyZj3Tpa749aTY/MJgV79ko1xPNbM0KjpVB/6MZ6hgjK9/lxC3aKmpoBbjFjEeel7zCrGwX5R brain4net@vnfm"
- state: present
- manage_dir: yes
- - name: changing password
- user:
- name: root
- update_password: always
- password: "{{ 'p5A8kIKT' | password_hash('sha512') }}"
- - name: changing hostname
- hostname:
- name: zabbixHostname
- - name: editing the zabbix-agent's config
- lineinfile:
- path: /etc/zabbix/zabbix_agentd.conf
- regexp: "{{ item.regexp }}"
- line: "{{ item.line }}"
- with_items:
- - { regexp: '^Server=', line: 'Server=zabbixProxy' }
- - { regexp: '^ServerActive=', line: 'ServerActive=zabbixProxy' }
- - { regexp: '^Hostname=', line: 'Hostname=zabbixHostname' }
- - name: restarting the zabbix-agent service
- service:
- name: zabbix-agent
- state: restarted
- enabled: yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement