Skip to content

Commit

Permalink
step_ca: fix failure on ipv6-only networks (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoesel authored Apr 8, 2024
1 parent 1198445 commit 90780c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion roles/step_ca/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ See the [step docs](https://smallstep.com/docs/step-cli/reference/ca/init) for m

##### `step_ca_dns`
- The comma separated DNS names or IP addresses of the new CA
- Default: `{{ ansible_fqdn}},{{ ansible_default_ipv4.address }}`
- Includes the hosts FQDN and main IPv4/6 addresses by default, if present
- Default: `"{{ ansible_fqdn }},{{ ansible_default_ipv4.address | d('') }},{{ ansible_default_ipv6.address | d('') }}"`

##### `step_ca_address`
- The address that the new CA will listen at
Expand Down
3 changes: 2 additions & 1 deletion roles/step_ca/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ step_ca_path: /etc/step-ca
#step_ca_name:
#step_ca_root_password:
#step_ca_intermediate_password:
step_ca_dns: "{{ ansible_fqdn }},{{ ansible_default_ipv4.address }}"
# step-ca init skips empty entries, so this works
step_ca_dns: "{{ ansible_fqdn }},{{ ansible_default_ipv4.address | d('') }},{{ ansible_default_ipv6.address | d('') }}"
step_ca_address: ":443"

#step_ca_existing_root:
Expand Down
6 changes: 4 additions & 2 deletions roles/step_ca/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ argument_specs:
- If unset, uses the root password will be used as the intermediate password
step_ca_dns:
type: str
default: "{{ ansible_fqdn}},{{ ansible_default_ipv4.address }}"
description: The comma separated DNS names or IP addresses of the new CA
default: "{{ ansible_fqdn }},{{ ansible_default_ipv4.address | d('') }},{{ ansible_default_ipv6.address | d('') }}"
description:
- The comma separated DNS names or IP addresses of the new CA
- Includes the hosts FQDN and main IPv4/6 addresses by default, if present
step_ca_address:
type: str
default: :443
Expand Down

0 comments on commit 90780c8

Please sign in to comment.