diff options
author | pmikus <pmikus@cisco.com> | 2020-05-13 11:46:46 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2020-05-14 11:56:35 +0000 |
commit | f9f7672ff42274dd05320c153cd8efc7a9986e7e (patch) | |
tree | f507e07953d26e64b5b56418fa3f08cb3ee78196 /resources/tools/testbed-setup | |
parent | f80a0bee8634eeb638a4a4f99f733c5144de6632 (diff) |
Ansible: Small maintenance
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I542401d77a777dfc2d930de626e19c1d8083941c
Diffstat (limited to 'resources/tools/testbed-setup')
10 files changed, 13 insertions, 85 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/handlers/cimc.yaml b/resources/tools/testbed-setup/ansible/roles/baremetal/handlers/cimc.yaml index 65f0c83f87..0048d19032 100644 --- a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/handlers/cimc.yaml +++ b/resources/tools/testbed-setup/ansible/roles/baremetal/handlers/cimc.yaml @@ -1,5 +1,5 @@ --- -# file: roles/vexx_hosts/handlers/cimc.yaml +# file: roles/baremeatal/handlers/cimc.yaml - name: Boot from network imc_rest: diff --git a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/handlers/ipmi.yaml b/resources/tools/testbed-setup/ansible/roles/baremetal/handlers/ipmi.yaml index 549454a1a2..239b8973f7 100644 --- a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/handlers/ipmi.yaml +++ b/resources/tools/testbed-setup/ansible/roles/baremetal/handlers/ipmi.yaml @@ -1,5 +1,5 @@ --- -# file: roles/vexx_hosts/handlers/ipmi.yaml +# file: roles/baremetal/handlers/ipmi.yaml - name: Boot from network ipmi_boot: diff --git a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/baremetal/handlers/main.yaml index bd52fdc9a9..d8dabeb222 100644 --- a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/handlers/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/baremetal/handlers/main.yaml @@ -1,5 +1,5 @@ --- -# file: roles/vexx_hosts/handlers/main.yaml +# file: roles/baremetal/handlers/main.yaml - name: IPMI specific import_tasks: ipmi.yaml diff --git a/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml index 368ddf5d1a..1f7fdf6692 100644 --- a/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml @@ -18,6 +18,8 @@ owner: 'root' group: 'root' mode: '0644' + notify: + - 'Restart Docker' when: > proxy_env is defined and proxy_env.http_proxy is defined @@ -30,18 +32,11 @@ owner: 'root' group: 'root' mode: '0644' - when: > - proxy_env is defined and - proxy_env.https_proxy is defined - tags: install-docker - -- name: Docker - Reload systemd daemon and restart service - command: 'systemctl daemon-reload' notify: - 'Restart Docker' when: > proxy_env is defined and - proxy_env.http_proxy is defined + proxy_env.https_proxy is defined tags: install-docker - name: Docker - Set specific users to docker group diff --git a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/vexx_hosts/defaults/main.yaml deleted file mode 100644 index 37b48f81c2..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/defaults/main.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# file: roles/vexx_hosts/defaults/main.yaml - -# provision via cobbler -provision_enabled: False -# name_servers is used in /etc/netplan/01-netcfg.yaml -name_servers: "1.1.1.1, 8.8.8.8" - -# Proxy settings: Uncomment and fill the proper values. These variables will be -# set globally by writing into /etc/environment file on target machine. -#proxy_env: -# http_proxy: http://proxy.com:80 -# HTTP_PROXY: http://proxy.com:80 -# https_proxy: http://proxy.com:80 -# HTTPS_PROXY: http://proxy.com:80 -# ftp_proxy: http://proxy.com:80 -# FTP_PROXY: http://proxy.com:80 -# no_proxy: localhost,127.0.0.1,{{ ansible_default_ipv4.address }} -# NO_PROXY: localhost,127.0.0.1,{{ ansible_default_ipv4.address }} diff --git a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/vexx_hosts/tasks/main.yaml deleted file mode 100644 index decda18649..0000000000 --- a/resources/tools/testbed-setup/ansible/roles/vexx_hosts/tasks/main.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# file: roles/vexx_hosts/tasks/main.yaml - -- name: Ensure the system exists in Cobbler - cobbler_system: - host: "{{ cobbler_hostname }}" - port: 60080 - interfaces: - br1: - ipaddress: "{{ ansible_default_ipv4.address }}" - macaddress: "{{ ansible_default_ipv4.macaddress }}" - name: "{{ hostname }}" - password: "{{ cobbler_password }}" - properties: - hostname: "{{ hostname }}" - gateway: "{{ ansible_default_ipv4.gateway }}" - profile: "{{ cobbler_profile }}" - name_servers: "{{ name_servers }}" - kickstart: "/var/lib/cobbler/kickstarts/{{ cobbler_profile }}.seed" - kernel_options: '"interface={{ ansible_default_ipv4.interface }}"' - netboot_enabled: yes - username: "{{ cobbler_username }}" - use_ssl: no - validate_certs: no - when: provision_enabled - delegate_to: localhost - tags: - - cobbler-include - -- name: Commit Cobbler changes - cobbler_sync: - host: "{{ cobbler_hostname }}" - port: 60080 - password: "{{ cobbler_password }}" - username: "{{ cobbler_username }}" - use_ssl: no - validate_certs: no - run_once: yes - when: provision_enabled - delegate_to: localhost - register: __included_in_cobbler - notify: - - "Boot from network" - - "Reboot server" - tags: - - cobbler-include - -- meta: flush_handlers diff --git a/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml index 327d8b7456..323d00cf29 100644 --- a/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml @@ -1,5 +1,5 @@ --- -# file: roles/sut/defaults/main.yaml +# file: roles/vpp/defaults/main.yaml packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}" diff --git a/resources/tools/testbed-setup/ansible/sut.yaml b/resources/tools/testbed-setup/ansible/sut.yaml index 650f100523..47e72bd5a6 100644 --- a/resources/tools/testbed-setup/ansible/sut.yaml +++ b/resources/tools/testbed-setup/ansible/sut.yaml @@ -6,10 +6,10 @@ become: yes become_user: root roles: + - role: baremetal + tags: baremetal - role: common tags: common - - role: vexx_hosts - tags: vexx_hosts - role: vpp tags: vpp - role: dpdk diff --git a/resources/tools/testbed-setup/ansible/tg.yaml b/resources/tools/testbed-setup/ansible/tg.yaml index 172e8a9721..a2c9fe5f23 100644 --- a/resources/tools/testbed-setup/ansible/tg.yaml +++ b/resources/tools/testbed-setup/ansible/tg.yaml @@ -6,10 +6,10 @@ become: yes become_user: root roles: + - role: baremetal + tags: baremetal - role: common tags: common - - role: vexx_hosts - tags: vexx_hosts - role: tg tags: tg - role: iperf diff --git a/resources/tools/testbed-setup/ansible/vpp_device.yaml b/resources/tools/testbed-setup/ansible/vpp_device.yaml index e50ef6f0e4..651ba4573a 100644 --- a/resources/tools/testbed-setup/ansible/vpp_device.yaml +++ b/resources/tools/testbed-setup/ansible/vpp_device.yaml @@ -6,10 +6,10 @@ become: yes become_user: root roles: + - role: baremetal + tags: baremetal - role: common tags: common - - role: vexx_hosts - tags: vexx_hosts - role: docker tags: docker - role: vpp_device |