diff --git a/README.md b/README.md index b6c761a..06fe6be 100644 --- a/README.md +++ b/README.md @@ -69,11 +69,13 @@ None. | Variable | Description | Default | Required | |----------|-------------|---------|----------| -| cyhy_reports_file_owner_group | The name of the group that should own any non-system files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No | -| cyhy_reports_file_owner_username | The name of the user that should own any non-system files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No | -| cyhy_reports_maxmind_license_key | The MaxMind license key that provides access to a GeoIP2 database subscription. | n/a | Yes | -| cyhy_reports_texmf_buffer_size | The value to use for the texmf buffer size. | n/a | No | -| cyhy_reports_texmf_main_memory | The value to use for the texmf main memory size. | n/a | No | +| cyhy\_reports\_file\_owner\_group | The name of the group that should own any non-system files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No | +| cyhy\_reports\_file\_owner\_username | The name of the user that should own any non-system files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No | +| cyhy\_reports\_install\_geoipupdate | Whether to install the MaxMind geoipupdate tool. | `false` | No | +| cyhy\_reports\_maxmind\_account\_id | The MaxMind account ID for access to a GeoIP2 database subscription. | n/a | Yes | +| cyhy\_reports\_maxmind\_license\_key | The MaxMind license key that provides access to a GeoIP2 database subscription. | n/a | Yes | +| cyhy\_reports\_texmf\_buffer\_size | The value to use for the texmf buffer size. | n/a | No | +| cyhy\_reports\_texmf\_main\_memory | The value to use for the texmf main memory size. | n/a | No | ## Dependencies ## diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..ff29375 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,4 @@ +--- +# This mirrors the defaults in cisagov/ansible-role-cyhy-core and +# cisagov/ansible-role-geoip2 +cyhy_reports_install_geoipupdate: false diff --git a/molecule/all_options/converge.yml b/molecule/all_options/converge.yml index 2455ba9..489bf23 100644 --- a/molecule/all_options/converge.yml +++ b/molecule/all_options/converge.yml @@ -9,6 +9,7 @@ ansible.builtin.include_role: # noqa var-naming[no-role-prefix] name: ansible-role-cyhy-reports vars: + cyhy_reports_maxmind_account_id: "{{ lookup('aws_ssm', '/cyhy/core/geoip/account_id', region='us-east-1') }}" cyhy_reports_maxmind_license_key: "{{ lookup('aws_ssm', '/cyhy/core/geoip/license_key', region='us-east-1') }}" cyhy_reports_texmf_buffer_size: 500000 cyhy_reports_texmf_main_memory: 10000000 diff --git a/molecule/buffer_size/converge.yml b/molecule/buffer_size/converge.yml index 332e723..13fce4b 100644 --- a/molecule/buffer_size/converge.yml +++ b/molecule/buffer_size/converge.yml @@ -9,5 +9,6 @@ ansible.builtin.include_role: # noqa var-naming[no-role-prefix] name: ansible-role-cyhy-reports vars: + cyhy_reports_maxmind_account_id: "{{ lookup('aws_ssm', '/cyhy/core/geoip/account_id', region='us-east-1') }}" cyhy_reports_maxmind_license_key: "{{ lookup('aws_ssm', '/cyhy/core/geoip/license_key', region='us-east-1') }}" cyhy_reports_texmf_buffer_size: 500000 diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index e0e7360..084ed3a 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-reports vars: + cyhy_reports_maxmind_account_id: "{{ lookup('aws_ssm', '/cyhy/core/geoip/account_id', region='us-east-1') }}" cyhy_reports_maxmind_license_key: "{{ lookup('aws_ssm', '/cyhy/core/geoip/license_key', region='us-east-1') }}" diff --git a/molecule/main_memory/converge.yml b/molecule/main_memory/converge.yml index 8c811f5..4cf271d 100644 --- a/molecule/main_memory/converge.yml +++ b/molecule/main_memory/converge.yml @@ -9,5 +9,6 @@ ansible.builtin.include_role: # noqa var-naming[no-role-prefix] name: ansible-role-cyhy-reports vars: + cyhy_reports_maxmind_account_id: "{{ lookup('aws_ssm', '/cyhy/core/geoip/account_id', region='us-east-1') }}" cyhy_reports_maxmind_license_key: "{{ lookup('aws_ssm', '/cyhy/core/geoip/license_key', region='us-east-1') }}" cyhy_reports_texmf_main_memory: 10000000 diff --git a/tasks/main.yml b/tasks/main.yml index 2b2d464..8c7e273 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,12 +3,17 @@ ansible.builtin.include_role: name: cyhy_core vars: + cyhy_core_install_geoipupdate: "{{ cyhy_reports_install_geoipupdate }}" + cyhy_core_maxmind_account_id: "{{ cyhy_reports_maxmind_account_id }}" cyhy_core_maxmind_license_key: "{{ cyhy_reports_maxmind_license_key }}" - name: Install cisagov/ncats-webd ansible.builtin.include_role: name: ncats_webd vars: + # Since MaxMind download and set up is already done in the + # cisagov/cyhy-core role, we just need to pass the required variables. + ncats_webd_maxmind_account_id: "{{ cyhy_reports_maxmind_account_id }}" ncats_webd_maxmind_license_key: "{{ cyhy_reports_maxmind_license_key }}" - name: Install and configure TeX Live diff --git a/terraform/user.tf b/terraform/user.tf index 4f3953a..24c3483 100644 --- a/terraform/user.tf +++ b/terraform/user.tf @@ -10,6 +10,9 @@ module "user" { aws.images-staging-ssm = aws } - entity = "ansible-role-cyhy-reports" - ssm_parameters = ["/cyhy/core/geoip/license_key"] + entity = "ansible-role-cyhy-reports" + ssm_parameters = [ + "/cyhy/core/geoip/account_id", + "/cyhy/core/geoip/license_key", + ] }