forked from t-prinz/redhat_satellite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsatellite_install.yml
42 lines (36 loc) · 1.7 KB
/
satellite_install.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- name: Ensure Satellite is installed
# hosts: all
hosts: "{{ hostlist | default('all') }}"
become: True
tasks:
- name: Print Satellite installation parameters
debug:
msg: "{{ inventory_hostname }}, {{ satellite_username }}, {{ satellite_password }}, {{ satellite_organization }}, {{ satellite_location }} {{ satellite_manifest_path }}"
verbosity: 1
# - name: Install Satellite
# include_role:
# name: redhat.satellite_operations.installer
# vars:
# satellite_installer_scenario: "satellite"
# satellite_installer_options:
# - "--foreman-initial-organization {{ satellite_organization }}"
# - "--foreman-initial-location {{ satellite_location }}"
# - "--foreman-initial-admin-username {{ satellite_username }}"
# - "--foreman-initial-admin-password {{ satellite_password }}"
# register: satellite_install_output
- name: Install Satellite; wait for up to an hour to complete
command: "satellite-installer --scenario satellite --foreman-initial-organization {{ satellite_organization }} --foreman-initial-location {{ satellite_location }} --foreman-initial-admin-username {{ satellite_username }} --foreman-initial-admin-password {{ satellite_password }}"
register: satellite_install_output
ignore_errors: yes
async: 3600
poll: 60
- name: Print installation output
debug:
var: satellite_install_output
verbosity: 1
- name: Check on installation and fail the play if the installation failed
debug:
msg: "Satellite installation failed; failing play"
when: satellite_install_output.failed
failed_when: satellite_install_output.failed