Skip to content

Commit

Permalink
Merge pull request #78 from cisagov/improvement/update_usage_of_ansib…
Browse files Browse the repository at this point in the history
…le-role-cyhy-core

Update the role for changes in `cisagov/ansible-role-cyhy-core`
  • Loading branch information
mcdonnnj authored Jul 16, 2024
2 parents 73ae6f6 + 3c6df57 commit 2c64168
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 7 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##

Expand Down
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
# This mirrors the defaults in cisagov/ansible-role-cyhy-core and
# cisagov/ansible-role-geoip2
cyhy_reports_install_geoipupdate: false
1 change: 1 addition & 0 deletions molecule/all_options/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions molecule/buffer_size/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}"
1 change: 1 addition & 0 deletions molecule/main_memory/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions terraform/user.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
}

0 comments on commit 2c64168

Please sign in to comment.