Install the following packages on your remote system where you want to install openITCOCKPIT with ansible:
apt install python python-dev python-pip python-jinja2 python-paramiko python-crypto git python-yaml
pip install ansible
Ansible accesses remote systems via SSH. I always recommend the root user to use (sudo configuration is not tested). For this purpose, an SSH key must be generated on the client system, which is then distributed to the systems:
ssh-keygen -b 4096
After that the key ~/.ssh/id_rsa.pub has to be stored for all targethosts under /root/.ssh/authorized_keys.
If the user is not root on the client machine, the SSH configuration should always be adapted so that the root system is always tried to log on to the target systems:
Host * User root
Ansible also offers other possibilities to connect to the target systems.
These are stored in the official Ansible documentation.
mkdir -p ~/ansible/openITCOCKPIT cd ~/ansible/openITCOCKPIT
git clone https://github.com/it-novum/ansible-role-systemtools.git systemtools git clone https://github.com/it-novum/ansible-role-postfix-smarthost.git postfix-smarthost git clone https://github.com/it-novum/ansible-role-mysql.git mysql git clone https://github.com/it-novum/ansible-role-createdb.git createdb git clone https://github.com/it-novum/ansible-modules-etc.git modules-etc git clone https://github.com/it-novum/ansible-role-openitcockpit.git openitcockpit git clone https://github.com/it-novum/ansible-openitcockpit-inventory.git openitcockpit-inventory
In site.yml you can configure the name of your system to be installed.
In default the Community-License will be used, but you can change it to an other if you bought one.
- name: openITCOCKPIT hosts: - oitc roles: - systemtools - openitcockpit vars: openitcockpit_license: 0dc0d951-e34e-43d0-a5a5-a690738e6a49
Insert in hosts file your remote system IP or hostname:
Further parameters are documented in the README:
ansible-playbook -i hosts site.yml -e 'openitcockpit_user_password=UserPassword'
ansible-playbook -i hosts site.yml \ -e 'openitcockpit_mailserver=MailserverAddress openitcockpit_smtpport=MailserverPort openitcockpit_senderaddress=MailSenderEmailAddress openitcockpit_user_firstname=UserFirstname openitcockpit_user_surname=UserLastname openitcockpit_user_email=UserLoginEmailAddress openitcockpit_user_password=UserPassword'
ansible-playbook -i hosts site.yml
© 2019 it-novum GmbH - All Rights Reserved