Repository navigation
feat: add Fleet AO smoke service demo #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
146bdf5
feat: add Fleet AO smoke service demo
hammer-redhat 9f1ec34
Merge branch 'ansible:main' into aap-demo-content
hammer-redhat 14e7239
Add Fleet smoke service job template
hammer-redhat 35e8dd7
Require explicit Fleet smoke host selection
hammer-redhat b663329
Fix Fleet smoke playbook lint
hammer-redhat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Fleet Automation Orchestrator smoke service | ||
|
|
||
| `fleet_ao_smoke.yml` provides the visible state change used by the | ||
| `aap-demo` Fleet and Automation Orchestrator integration. It starts | ||
| `aap-demo-fleet-smoke.service` on the selected Linux host, then verifies that | ||
| the unit is active. The transient service sleeps for five minutes and systemd | ||
| collects it afterwards. | ||
|
|
||
| Run it only through the Fleet-scoped AAP job template created by the | ||
| integration. The playbook needs a host with systemd and permission to use | ||
| `systemd-run`. | ||
|
chadmf marked this conversation as resolved.
Resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| # A bounded, visible state change for the aap-demo Fleet/AO integration. | ||
| # The transient unit is collected by systemd after its five-minute sleep. | ||
| - name: Start a short-lived Fleet AO demo service | ||
| hosts: "{{ _hosts | default('all') }}" | ||
|
hammer-redhat marked this conversation as resolved.
Resolved
|
||
| become: true | ||
| gather_facts: false | ||
|
|
||
| tasks: | ||
| - name: Check whether the transient demo service is already active | ||
| ansible.builtin.command: | ||
| cmd: systemctl is-active --quiet aap-demo-fleet-smoke.service | ||
| register: fleet_ao_service_state | ||
| changed_when: false | ||
| failed_when: false | ||
|
|
||
| - name: Run the temporary Fleet AO demo service | ||
| ansible.builtin.command: | ||
| cmd: >- | ||
| systemd-run --collect --unit=aap-demo-fleet-smoke /usr/bin/sleep 300 | ||
| when: fleet_ao_service_state.rc != 0 | ||
| changed_when: true | ||
|
chadmf marked this conversation as resolved.
Resolved
|
||
|
|
||
| - name: Verify transient Fleet AO demo service is active | ||
| ansible.builtin.command: | ||
| cmd: systemctl is-active --quiet aap-demo-fleet-smoke.service | ||
| changed_when: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| playbook=linux/fleet_ao_smoke.yml | ||
| test -f "$playbook" | ||
| rg -F 'systemd-run --collect --unit=aap-demo-fleet-smoke /usr/bin/sleep 300' "$playbook" | ||
| rg -F 'systemctl is-active --quiet aap-demo-fleet-smoke.service' "$playbook" | ||
|
hammer-redhat marked this conversation as resolved.
Resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.