summaryrefslogtreecommitdiffstats
path: root/tools/docker-compose/ansible/plumb_tacacs.yml
diff options
context:
space:
mode:
Diffstat (limited to 'tools/docker-compose/ansible/plumb_tacacs.yml')
-rw-r--r--tools/docker-compose/ansible/plumb_tacacs.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/docker-compose/ansible/plumb_tacacs.yml b/tools/docker-compose/ansible/plumb_tacacs.yml
new file mode 100644
index 0000000000..c7dcbe5e22
--- /dev/null
+++ b/tools/docker-compose/ansible/plumb_tacacs.yml
@@ -0,0 +1,32 @@
+---
+- name: Plumb a tacacs+ instance
+ hosts: localhost
+ connection: local
+ gather_facts: False
+ vars:
+ awx_host: "https://localhost:8043"
+ tasks:
+ - name: Load existing and new tacacs+ settings
+ set_fact:
+ existing_tacacs: "{{ lookup('awx.awx.controller_api', 'settings/tacacsplus', host=awx_host, verify_ssl=false) }}"
+ new_tacacs: "{{ lookup('template', 'tacacsplus_settings.json.j2') }}"
+
+ - name: Display existing tacacs+ configuration
+ debug:
+ msg:
+ - "Here is your existing tacacsplus configuration for reference:"
+ - "{{ existing_tacacs }}"
+
+ - pause:
+ prompt: "Continuing to run this will replace your existing tacacs settings (displayed above). They will all be captured. Be sure that is backed up before continuing"
+
+ - name: Write out the existing content
+ copy:
+ dest: "../_sources/existing_tacacsplus_adapter_settings.json"
+ content: "{{ existing_tacacs }}"
+
+ - name: Configure AWX tacacs+ adapter
+ awx.awx.settings:
+ settings: "{{ new_tacacs }}"
+ controller_host: "{{ awx_host }}"
+ validate_certs: False