mirror of
https://github.com/trailofbits/algo.git
synced 2025-06-07 23:53:58 +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:
|
- set_fact:
|
||||||
cloud_instance_ip: "{{ server_ip }}"
|
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