Skip to content

Commit

Permalink
Merge pull request #56 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 10, 2024
2 parents d504cb6 + 6a867dc commit f5bf2e4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ None.

| Variable | Description | Default | Required |
|----------|-------------|---------|----------|
| cyhy_archive_file_owner_group | The name of the group that should own any files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No |
| cyhy_archive_file_owner_username | The name of the user that should own any files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No |
| cyhy_archive_maxmind_license_key | The MaxMind license key that provides access to a GeoIP2 database subscription. | n/a | Yes |
| cyhy\_archive\_file\_owner\_group | The name of the group that should own any files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No |
| cyhy\_archive\_file\_owner\_username | The name of the user that should own any files or directories created by this role. | [Omitted](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#making-variables-optional) | No |
| cyhy\_archive\_install\_geoipupdate | Whether to install the MaxMind geoipupdate tool. | `false` | No |
| cyhy\_archive\_maxmind\_account\_id | The MaxMind account ID for access to a GeoIP2 database subscription. | n/a | Yes |
| cyhy\_archive\_maxmind\_license\_key | The MaxMind license key that provides access to a GeoIP2 database subscription. | n/a | Yes |

## 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_archive_install_geoipupdate: false
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-archive
vars:
cyhy_archive_maxmind_account_id: "{{ lookup('aws_ssm', '/cyhy/core/geoip/account_id', region='us-east-1') }}"
cyhy_archive_maxmind_license_key: "{{ lookup('aws_ssm', '/cyhy/core/geoip/license_key', region='us-east-1') }}"
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
ansible.builtin.include_role:
name: cyhy_core
vars:
cyhy_core_install_geoipupdate: "{{ cyhy_archive_install_geoipupdate }}"
cyhy_core_maxmind_account_id: "{{ cyhy_archive_maxmind_account_id }}"
cyhy_core_maxmind_license_key: "{{ cyhy_archive_maxmind_license_key }}"

- name: Create the /var/cyhy/scripts directory
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-archive"
ssm_parameters = ["/cyhy/core/geoip/license_key"]
entity = "ansible-role-cyhy-archive"
ssm_parameters = [
"/cyhy/core/geoip/account_id",
"/cyhy/core/geoip/license_key",
]
}

0 comments on commit f5bf2e4

Please sign in to comment.