Skip to content

Commit 266c9e6

Browse files
committed
Introduce foreman_url variable
1 parent e3fa5ff commit 266c9e6

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/playbooks/deploy/deploy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
foreman_client_certificate: "{{ client_certificate }}"
3030
foreman_oauth_consumer_key: abcdefghijklmnopqrstuvwxyz123456
3131
foreman_oauth_consumer_secret: abcdefghijklmnopqrstuvwxyz123456
32+
foreman_url: "https://{{ ansible_fqdn }}"
3233
httpd_server_ca_certificate: "{{ server_ca_certificate }}"
3334
httpd_client_ca_certificate: "{{ client_ca_certificate }}"
3435
httpd_server_certificate: "{{ server_certificate }}"

src/roles/foreman/defaults/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ foreman_database_port: 5432
99
foreman_database_pool: 9
1010
foreman_database_sslmode: disable
1111
foreman_database_sslrootcert:
12+
13+
foreman_url: "http://{{ ansible_fqdn }}:3000"

src/roles/foreman/tasks/main.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120

121121
- name: Wait for Foreman service to be accessible
122122
ansible.builtin.uri:
123-
url: 'http://{{ ansible_fqdn }}:3000/api/v2/ping'
123+
url: '{{ foreman_url }}/api/v2/ping'
124+
validate_certs: false
124125
until: foreman_status.status == 200
125126
retries: 60
126127
delay: 5
@@ -138,7 +139,8 @@
138139

139140
- name: Wait for Foreman tasks to be ready
140141
ansible.builtin.uri:
141-
url: 'http://{{ ansible_fqdn }}:3000/api/v2/ping'
142+
url: '{{ foreman_url }}/api/v2/ping'
143+
validate_certs: false
142144
until:
143145
- foreman_tasks_status.status == 200
144146
- foreman_tasks_status.json['results']['katello']['services']['foreman_tasks']['status'] == 'ok'
@@ -152,6 +154,7 @@
152154
theforeman.foreman.smart_proxy:
153155
name: "{{ ansible_fqdn }}-pulp"
154156
url: "https://{{ ansible_fqdn }}/pulp/api/v3/smart_proxy"
155-
server_url: "http://{{ ansible_fqdn }}:3000"
157+
server_url: "{{ foreman_url }}"
156158
username: "{{ foreman_initial_admin_username }}"
157159
password: "{{ foreman_initial_admin_password }}"
160+
validate_certs: false

src/roles/post_install/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- "{{ _post_install_url_msg }}"
66
- "{{ _post_install_cred_msg if (post_install_done_flag is not exists) else '' }}"
77
vars:
8-
_post_install_url_msg: "Foreman is running at https://{{ ansible_fqdn }}"
8+
_post_install_url_msg: "Foreman is running at {{ foreman_url }}"
99
_post_install_cred_msg: "Admin credentials: {{ foreman_initial_admin_username }}:{{ foreman_initial_admin_password }}"
1010
- name: Mark installation as complete
1111
ansible.builtin.copy:

0 commit comments

Comments
 (0)