2023-04-13 13:30:53 +00:00
|
|
|
- name: Add OITC GPG Key
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: https://packages.openitcockpit.io/repokey.txt
|
|
|
|
dest: /etc/apt/keyrings/openitcockpit-agent-keyring.asc
|
2023-02-06 22:13:32 +00:00
|
|
|
|
|
|
|
- name: Add specified repository into sources list
|
|
|
|
ansible.builtin.apt_repository:
|
2023-04-13 13:30:53 +00:00
|
|
|
repo: "deb [signed-by=/etc/apt/keyrings/openitcockpit-agent-keyring.asc] https://packages.openitcockpit.io/openitcockpit-agent/deb/stable deb main"
|
2023-02-06 22:13:32 +00:00
|
|
|
state: present
|
|
|
|
|
2023-04-02 19:05:33 +00:00
|
|
|
- name: Install OITC-Agent
|
2023-02-06 22:13:32 +00:00
|
|
|
apt: name={{ item }} state=latest update_cache=yes
|
|
|
|
with_items:
|
|
|
|
- openitcockpit-agent
|
|
|
|
|
|
|
|
- name: Copy Config File
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: oitc.ini.j2
|
|
|
|
dest: /etc/openitcockpit-agent/config.ini
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0775'
|
|
|
|
|
|
|
|
- name: Restart service httpd, in all cases
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: openitcockpit-agent
|
|
|
|
state: restarted
|