diff --git a/README.md b/README.md index 6082343..3852cf4 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,9 @@ the repository's settings. | Variable | Description | Default | Required | |----------|-------------|---------|----------| -| cyhy_core_maxmind_license_key | The MaxMind license key that provides access to a GeoIP2 database subscription. | n/a | Yes | +| cyhy\_core\_install\_geoipupdate | Whether to install the MaxMind geoipupdate tool. | `false` | No | +| cyhy\_core\_maxmind\_account\_id | The MaxMind account ID for access to a GeoIP2 database subscription. | n/a | Yes | +| cyhy\_core\_maxmind\_license\_key | The MaxMind license key that provides access to a GeoIP2 database subscription. | n/a | Yes | ## Dependencies ## diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..7e84aaf --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,3 @@ +--- +# This mirrors the default in cisagov/ansible-role-geoip2 +cyhy_core_install_geoipupdate: false diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 765990a..ce919e1 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -9,4 +9,5 @@ ansible.builtin.include_role: # noqa var-naming[no-role-prefix] name: ansible-role-cyhy-core vars: + cyhy_core_maxmind_account_id: "{{ lookup('aws_ssm', '/cyhy/core/geoip/account_id', region='us-east-1') }}" cyhy_core_maxmind_license_key: "{{ lookup('aws_ssm', '/cyhy/core/geoip/license_key', region='us-east-1') }}" diff --git a/tasks/main.yml b/tasks/main.yml index bead03f..ff9003f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,6 +3,8 @@ ansible.builtin.include_role: name: geoip2 vars: + geoip2_install_geoipupdate: "{{ cyhy_core_install_geoipupdate }}" + geoip2_maxmind_account_id: "{{ cyhy_core_maxmind_account_id }}" geoip2_maxmind_license_key: "{{ cyhy_core_maxmind_license_key }}" - name: Install system versions of the Python packages that cyhy-core needs diff --git a/terraform/user.tf b/terraform/user.tf index f4bc27c..e2cef72 100644 --- a/terraform/user.tf +++ b/terraform/user.tf @@ -10,6 +10,9 @@ module "user" { aws.images-staging-ssm = aws } - entity = "ansible-role-cyhy-core" - ssm_parameters = ["/cyhy/core/geoip/license_key"] + entity = "ansible-role-cyhy-core" + ssm_parameters = [ + "/cyhy/core/geoip/account_id", + "/cyhy/core/geoip/license_key", + ] }