Installing 8.1.5 via Ansible unattended

Hello, I was hoping to get some insight from someone who may have had some experience installing ignition 8.1.5 using Ansible. I was able to run the installation file with the – unattended=none options succesfully but when I’m trying to install via Ansible it just hangs with no error messages or anything happening. I do see that ansible was able to ssh into the system and the logs show that the command was run but it just sits there and doesn’t do anything or give me any errors. If anyone has any experience with automating the install process via Ansible I would love any input into it.

@vlay, we actually have a ticket logged to address one element that interferes with automated installations that target a non-root user. Thankfully there is a workaround for the behavior that causes an interactive prompt to still be presented (probably what you’re running into). Below is a simple installer task from a playbook that I’ve used before:

- name: Run Ignition Installer
  command: |
    {{ download_results.dest }}
    --
    location={{ ignition_install_path }}
    serviceName={{ ignition_service_name }}
    user={{ ignition_user }}
    unattended=text
    textMode=true
  environment:
    # These workaround the fact that the installer shell script doesn't accept the user=<install user> when running as root
    SKIP: 1
    CURRENT_USER: "{{ ignition_user }}"
  args:
    creates: "{{ ignition_install_path }}/ignition-gateway"
  register: ignition_install_results

I’m attaching the whole solution with the entire playbook (install-ignition.yml) for reference. I’ve used it as a baseline for test benches and it works nicely! Obviously you may not need the Vagrant bits, but others may find it interesting.

forum-48442-ansible-baseline.zip (7.4 KB) (EDIT: added the missing installers folder that was empty/ignored and sniped by my git archive)

And an asciinema demo for those that are curious :smiley::
forum-48442

1 Like

Awesome - yeah I found out that I was running into the issue of a prompt coming up asking for a username to be provide since I ran the task with elevated privileges. This is exactly what I was looking for so very much appreciated.

Is there anyway to make the default as standard edition in ansible. Currently it is presenting the user to select between maker edition, standard edition and edge edition

You could add a systemd service override file, take a look at this thread for some inspiration.

@kcollins1 Thank you. I was able to get past that. How do I get the list of parameters I can override. Now I am trying to get past the "enable quick start dialog"
image

Most of the environment variables in the Docker Image documentation are actually built into the platform (and will be recognized by a normal installation as well). You're looking for DISABLE_QUICKSTART, which you can set to true to disable the quick start prompt on first-launch.

@kcollins1 thank you DISABLE_QUICKSTART worked. Now if I want to load a few selected modules, I set the override parameter Environment="GATEWAY_MODULES_ENABLED=enterprise-administration,alarm-notification" But still it loads all the default modules as below instead of only the 2 modules mentioned in the list. Is there anyway to restrict the modules that get loaded

The Environment Variable GATEWAY_MODULES_ENABLED is specific to the Docker image only. For your Ansible automation, simply remove the modules you don't want to have loaded from the filesystem under user-lib/modules/.

1 Like

Thank you @kcollins1. Is there any way to create DB connection automatically using ansible?

No supported way to do that yet...

4 posts were merged into an existing topic: Silent installation of 8.1.25 on Windows vm using Ansible