Icinga / ansible-playbooks

Ansible Playbook for Icinga 2
GNU General Public License v2.0
225 stars 122 forks source link

icinga2-ansible-web2-ui is incomplete and requires manual intervention #57

Open ghost opened 7 years ago

ghost commented 7 years ago

The icinga2-ansible-web2-ui role is does not allow for a fully automated installation and requires manual intervention to finish the installation as indicated by the following message Now generate a token with 'icingacli setup token create' and go at http://IP//icingaweb2/setup to continue the installation

Skeen commented 6 years ago

The token can be picked up rather easily with a delegation of a shell command:

 - name: Get setup token.
   shell: 'icingacli setup token create | sed "s/.*token is: \(.*\)/\1/g"'
   register: setup_token
   delegate_to: "{{ server }}"

After this, the value can be accessed as: "{{ setup_token.stdout }}"

aflatto commented 6 years ago

@Skeen thanks you for the code contribution , commit 68ff54e is based on your suggestion

Skeen commented 6 years ago

I'm not convinced this issue should be closed yet, there's still the manual step which requires a web browser.

Skeen commented 6 years ago

It might be better to pull the setup_token from the /etc/icingaweb2/setup.token file.

maccadia commented 6 years ago

The steps to automate IcingaWeb2 setup are documented here. It would be nice to have a zero-touch install. However, I don't know how much work is needed to cover all possible setups.

Bitblade commented 5 years ago

I've managed to do it for Debian as a proof of concept. My playbook is far from 'viewable' at the moment, but it can be done. I've started to rewrite it based on that playbook. https://github.com/Icinga/ansible-playbooks/pull/101 is the first step.