Last active
October 13, 2020 14:51
-
-
Save KyMidd/dcb0e7f46ec22f2f010037d840b2575d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove old version of playbook | |
rm -f AWS2ASAPlaybook > /dev/null 2>&1 | |
# Build new file | |
# Write static | |
cat <<EOL >> AWS2ASAPlaybook | |
--- | |
- hosts: fw1 | |
gather_facts: yes | |
connection: local | |
tasks: | |
- name: Include Login Credentials | |
include_vars: secrets.yml | |
- name: Define Provider | |
set_fact: | |
provider: | |
host: "{{ ansible_host }}" | |
username: "{{ creds['username'] }}" | |
password: "{{ creds['password'] }}" | |
authorize: yes | |
auth_pass: "{{ creds['auth_pass'] }}" | |
- name: SAVE "Write Commands" | |
asa_config: | |
provider: "{{ provider }}" | |
commands: | |
- no access-list inside_acl permit tcp 10.10.0.0 255.255.0.0 object-group outside_ansible_AWSGlobalEast1_groupB eq 443 | |
- no access-list inside_acl permit tcp 10.20.0.0 255.255.0.0 object-group outside_ansible_AWSGlobalEast1_groupB eq 443 | |
- no access-list inside_acl remark Ansible AWS global East-1 groupB | |
- no object-group network outside_ansible_AWSGlobalEast1_groupB | |
- name: SAVE "Write Commands" | |
asa_config: | |
provider: "{{ provider }}" | |
commands: | |
EOL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment