forked from ansible/workshops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanual.yml
48 lines (43 loc) · 1.27 KB
/
manual.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- name: Perform Checks to setup manually created lab env
hosts: localhost
connection: local
become: false
gather_facts: false
tasks:
- name: Clone linklight repo
git:
accept_hostkey: true
clone: true
dest: "{{playbook_dir}}/linklight"
repo: https://github.com/network-automation/linklight.git
force: true
- name: Move ansible.cfg into ~/.ansible.cfg
copy:
src: "{{playbook_dir}}/linklight/vagrant-demo/arista/ansible.cfg"
dest: "~/.ansible.cfg"
- name: Move inventory into ~/
copy:
src: "{{playbook_dir}}/linklight/vagrant-demo/arista/hosts"
dest: "~/hosts"
# - name: Move hosts file into /etc/hosts
# copy:
# src: "{{playbook_dir}}/linklight/vagrant-demo/arista/etchosts"
# dest: "/etc/hosts"
# - name: Install EPEL
# yum:
# name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
# state: present
#
# - name: install packages
# yum:
# name: "{{item}}"
# state: present
# with_items:
# - python-netaddr
# - ansible
# state: latest
- lineinfile:
path: ~/.ansible.cfg
regexp: '^inventory'
line: 'inventory = hosts'