• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

agama-project / agama / 16651372762 / 3 – service
81%
master: 81%

Build:
DEFAULT BRANCH: master
Ran 31 Jul 2025 02:14PM UTC
Files 389
Run time 12s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2025 02:10PM UTC coverage: 88.515% (-0.002%) from 88.517%
service – 16651372762.3

push

github

web-flow
feat: embed questions configuration in the profile (#2612)

## Problem

* Bug [bsc#1246997](https://bugzilla.suse.com/show_bug.cgi?id=1246997)

To answer questions in advance when using the unattended mode, it is
required to use a pre-script. If you just want Agama to use the default
values, it is kind of straight-forward:

```jsonnet
  scripts: {
    pre: [
      {
        name: 'disable-questions',
	content: |||
          #!/usr/bin/bash
          agama questions mode non-interactive
	|||
      }
    ]
  }
```

However, if you want to answer an specific question (e.g., providing a
password for an existing encrypted file system) it is kind of tricky.
You might need to create a file like this:

```json
  {
    "answers": [
      {
        "password": "my-password",
        "class": "storage.luks_activation"
      },
    ]
  }
```

And the load it using a pre-script:

```jsonnet
  scripts: {
    pre: [
      {
        name: 'disable-questions',
	content: |||
          #!/usr/bin/bash
          agama download http://my-server.lan/answers.json answers.json
          agama questions answers answers.json
	|||
      }
    ]
  }
```

## Solution

Allow embedding the answers in the profile.

```json
  "questions": {
    "policy": "auto",
    "answers": [
      { "class": "storage.luks_activation", "password": "nots3cr3t" }
    ]
```

* `policy`: ask the user (`user`) or choose the default option (`auto`).
* `answers`: list of answers to the given question.

## Testing

- *Added a new unit test*
- *Tested manually*

11244 of 12703 relevant lines covered (88.51%)

60.97 hits per line

Source Files on job service - 16651372762.3
  • Tree
  • List 389
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 16651372762
  • 77785229 on github
  • Prev Job for on master (#16651313051.3)
  • Next Job for on master (#16651179440.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc