Skip to content

Commit ff4d736

Browse files
committed
Introduce foreman_url variable
1 parent e3fa5ff commit ff4d736

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
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'
124124
until: foreman_status.status == 200
125125
retries: 60
126126
delay: 5
@@ -138,7 +138,7 @@
138138

139139
- name: Wait for Foreman tasks to be ready
140140
ansible.builtin.uri:
141-
url: 'http://{{ ansible_fqdn }}:3000/api/v2/ping'
141+
url: '{{ foreman_url }}/api/v2/ping'
142142
until:
143143
- foreman_tasks_status.status == 200
144144
- foreman_tasks_status.json['results']['katello']['services']['foreman_tasks']['status'] == 'ok'
@@ -152,6 +152,6 @@
152152
theforeman.foreman.smart_proxy:
153153
name: "{{ ansible_fqdn }}-pulp"
154154
url: "https://{{ ansible_fqdn }}/pulp/api/v3/smart_proxy"
155-
server_url: "http://{{ ansible_fqdn }}:3000"
155+
server_url: "{{ foreman_url }}"
156156
username: "{{ foreman_initial_admin_username }}"
157157
password: "{{ foreman_initial_admin_password }}"

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)