mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-06 15:13:56 +02:00
local inventory #30
This commit is contained in:
parent
69ff22f9bb
commit
9cc9cf7b5f
1 changed files with 14 additions and 0 deletions
|
@ -19,3 +19,17 @@
|
|||
|
||||
- set_fact:
|
||||
cloud_instance_ip: "{{ server_ip }}"
|
||||
|
||||
- name: Ensure the group local exists in the dynamic inventory file
|
||||
lineinfile:
|
||||
state: present
|
||||
dest: configs/inventory.dynamic
|
||||
line: '[local]'
|
||||
|
||||
- name: Populate the dynamic inventory
|
||||
lineinfile:
|
||||
state: present
|
||||
dest: configs/inventory.dynamic
|
||||
insertafter: '\[local\]'
|
||||
regexp: "^{{ server_ip }}.*"
|
||||
line: "{{ server_ip }}"
|
||||
|
|
Loading…
Add table
Reference in a new issue