Skip to content

Commit

Permalink
Merge pull request #694 from cisagov/bug/fix_maxmind_license_passthrough
Browse files Browse the repository at this point in the history
Fix variable usage for Ansible roles in the Packer configuration
  • Loading branch information
mcdonnnj authored Oct 17, 2023
2 parents 0847caf + 16c39e3 commit b7e7bec
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
4 changes: 3 additions & 1 deletion packer/ansible/cyhy_archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
become: yes
become_method: ansible.builtin.sudo
roles:
- cyhy_archive
- role: cyhy_archive
vars:
cyhy_archive_maxmind_license_key: "{{ maxmind_license_key }}"
vars_files:
- vars/maxmind_license_key.yml
4 changes: 3 additions & 1 deletion packer/ansible/cyhy_commander.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
become: yes
become_method: ansible.builtin.sudo
roles:
- cyhy_commander
- role: cyhy_commander
vars:
cyhy_commander_maxmind_license_key: "{{ maxmind_license_key }}"
vars_files:
- vars/maxmind_license_key.yml
4 changes: 3 additions & 1 deletion packer/ansible/cyhy_dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
become: yes
become_method: ansible.builtin.sudo
roles:
- ncats_webd
- role: ncats_webd
vars:
ncats_webd_maxmind_license_key: "{{ maxmind_license_key }}"
- ncats_webui
vars_files:
- vars/maxmind_license_key.yml
9 changes: 5 additions & 4 deletions packer/ansible/cyhy_reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
become_method: ansible.builtin.sudo
roles:
- xfs
- cyhy_reports
- role: cyhy_reports
vars:
cyhy_reports_maxmind_license_key: "{{ maxmind_license_key }}"
cyhy_reports_texmf_buffer_size: 100000000
cyhy_reports_texmf_main_memory: 10000000
- cyhy_mailer
vars:
texmf_buffer_size: 100000000
texmf_main_memory: 10000000
vars_files:
- vars/maxmind_license_key.yml
4 changes: 2 additions & 2 deletions packer/ansible/nessus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
- cyhy_runner
- role: nessus
vars:
package_bucket: ncats-3rd-party-packages
version: "10.5.1"
nessus_package_bucket: ncats-3rd-party-packages
nessus_version: "10.5.1"
- more_ephemeral_ports
4 changes: 2 additions & 2 deletions packer/ansible/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
vars:
# Install pip2 for all images that will run Python 2 CyHy code.
# Right now these are the dashboard, mongo, and reporter AMIs.
install_pip2: "{{ inventory_hostname_short is in ['dashboard', 'mongo', 'reporter'] }}"
pip_install_pip2: "{{ inventory_hostname_short is in ['dashboard', 'mongo', 'reporter'] }}"
- role: python
vars:
# Install Python 2 for images that will run Python 2 CyHy code.
# Right now these are the dashboard, mongo, and reporter AMIs.
install_python2: "{{ inventory_hostname_short is in ['dashboard', 'mongo', 'reporter'] }}"
python_install_python2: "{{ inventory_hostname_short is in ['dashboard', 'mongo', 'reporter'] }}"

# Any instances that are not built on Amazon Linux 2 and don't require
# Python 2 should have it removed.
Expand Down

0 comments on commit b7e7bec

Please sign in to comment.