diff options
author | Vratko Polak <vrpolak@cisco.com> | 2018-07-09 15:14:36 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-07-10 11:23:31 +0000 |
commit | 61ef529d33efd51acd1b1986c325d25a9d7ba705 (patch) | |
tree | cbb5ab397295053934160102dc62aea4d53da939 /resources/tools/testbed-setup/ansible/roles/tg_sut/tasks | |
parent | 173a910c5f56106cd5aaa620ae0f9cfb94fcfac3 (diff) |
Remove THIS tag and use unix endlines
The THIS tag has sneaked in 10Ge2P1X520-Eth-L2Xcbase-Eth-1Memif-1Dcr-Mrr
but usually it is only to be used in draft testing.
Not sure about the way non-unix endlines crept in.
Is not git supposed to perform endline conversions on text files?
Or are .robot, .rst, .yaml and .vat not recognized as text?
Change-Id: Ia78cf942c05c3029c340a8639782786f37e57469
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg_sut/tasks')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml | 202 | ||||
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_x86_64.yaml | 364 |
2 files changed, 283 insertions, 283 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml index 1774134abe..ea779c07da 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/main.yaml @@ -1,101 +1,101 @@ ----
-# file: roles/tg_sut/tasks/main.yaml
-
-- name: Ubuntu specific
- import_tasks: ubuntu_x86_64.yaml
- when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64'
-
-- name: Copy interfaces file
- template:
- src: 'files/interfaces_physical'
- dest: '/etc/network/interfaces'
- owner: 'root'
- group: 'root'
- mode: '0644'
- tags: copy-interface-file
-
-- name: Copy sysctl file
- template:
- src: 'files/90-csit'
- dest: '/etc/sysctl.d/90-csit.conf'
- owner: 'root'
- group: 'root'
- mode: '0644'
- tags: copy-90-csit
-
-- name: Copy IRQ load balancing file
- copy:
- src: 'files/irqbalance'
- dest: '/etc/default/irqbalance'
- owner: 'root'
- group: 'root'
- mode: '0644'
- tags: copy-irq
-
-- name: Copy cpufrequtils file
- copy:
- src: 'files/cpufrequtils'
- dest: '/etc/default/cpufrequtils'
- owner: 'root'
- group: 'root'
- mode: '0644'
- tags: copy-cpufrequtils
-
-- name: Copy Python requirements file
- copy:
- src: 'files/requirements.txt'
- dest: '/tmp/requirements.txt'
- tags: copy-pip
-
-- name: Set isolcpus and pstate parameter
- lineinfile:
- path: '/etc/default/grub'
- state: 'present'
- regexp: '^GRUB_CMDLINE_LINUX='
- line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"'
- notify: ['Update GRUB']
- tags: set-grub
-
-- name: Set ondemand service to disable
- service:
- name: 'ondemand'
- enabled: 'no'
- tags: set-ondemand
-
-- name: Install PIP requirements
- pip:
- requirements: '/tmp/requirements.txt'
- tags: install-pip
-
-- name: Load vfio-pci by default
- lineinfile:
- path: '/etc/modules'
- state: 'present'
- line: 'vfio-pci'
- tags: load-vfio-pci
-
-- name: Load msr by default
- lineinfile:
- path: '/etc/modules'
- state: 'present'
- line: 'msr'
- tags: disable-turbo-boost
-
-- name: Disable Turbo-Boost by service
- copy:
- src: 'files/disable-turbo-boost.service'
- dest: '/etc/systemd/system/disable-turbo-boost.service'
- owner: 'root'
- group: 'root'
- mode: '0644'
- when: >
- inventory_hostname in groups['skylake']
- tags: disable-turbo-boost
-
-- name: Disable Turbo-Boost by service on startup
- service:
- name: disable-turbo-boost
- enabled: yes
- when: >
- inventory_hostname in groups['skylake']
- tags: disable-turbo-boost
+--- +# file: roles/tg_sut/tasks/main.yaml + +- name: Ubuntu specific + import_tasks: ubuntu_x86_64.yaml + when: ansible_distribution|lower == 'ubuntu' and ansible_machine == 'x86_64' + +- name: Copy interfaces file + template: + src: 'files/interfaces_physical' + dest: '/etc/network/interfaces' + owner: 'root' + group: 'root' + mode: '0644' + tags: copy-interface-file + +- name: Copy sysctl file + template: + src: 'files/90-csit' + dest: '/etc/sysctl.d/90-csit.conf' + owner: 'root' + group: 'root' + mode: '0644' + tags: copy-90-csit + +- name: Copy IRQ load balancing file + copy: + src: 'files/irqbalance' + dest: '/etc/default/irqbalance' + owner: 'root' + group: 'root' + mode: '0644' + tags: copy-irq + +- name: Copy cpufrequtils file + copy: + src: 'files/cpufrequtils' + dest: '/etc/default/cpufrequtils' + owner: 'root' + group: 'root' + mode: '0644' + tags: copy-cpufrequtils + +- name: Copy Python requirements file + copy: + src: 'files/requirements.txt' + dest: '/tmp/requirements.txt' + tags: copy-pip + +- name: Set isolcpus and pstate parameter + lineinfile: + path: '/etc/default/grub' + state: 'present' + regexp: '^GRUB_CMDLINE_LINUX=' + line: 'GRUB_CMDLINE_LINUX="isolcpus={{ isolcpus }} nohz_full={{ isolcpus }} rcu_nocbs={{ isolcpus }} numa_balancing=disable intel_pstate=disable intel_iommu=on iommu=pt nmi_watchdog=0 audit=0 nosoftlockup processor.max_cstate=1 intel_idle.max_cstate=1 hpet=disable tsc=reliable mce=off"' + notify: ['Update GRUB'] + tags: set-grub + +- name: Set ondemand service to disable + service: + name: 'ondemand' + enabled: 'no' + tags: set-ondemand + +- name: Install PIP requirements + pip: + requirements: '/tmp/requirements.txt' + tags: install-pip + +- name: Load vfio-pci by default + lineinfile: + path: '/etc/modules' + state: 'present' + line: 'vfio-pci' + tags: load-vfio-pci + +- name: Load msr by default + lineinfile: + path: '/etc/modules' + state: 'present' + line: 'msr' + tags: disable-turbo-boost + +- name: Disable Turbo-Boost by service + copy: + src: 'files/disable-turbo-boost.service' + dest: '/etc/systemd/system/disable-turbo-boost.service' + owner: 'root' + group: 'root' + mode: '0644' + when: > + inventory_hostname in groups['skylake'] + tags: disable-turbo-boost + +- name: Disable Turbo-Boost by service on startup + service: + name: disable-turbo-boost + enabled: yes + when: > + inventory_hostname in groups['skylake'] + tags: disable-turbo-boost diff --git a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_x86_64.yaml index 3c6eb10d62..f43fad1326 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_x86_64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg_sut/tasks/ubuntu_x86_64.yaml @@ -1,182 +1,182 @@ ----
-# file: roles/tg_sut/tasks/ubuntu_x86_64.yaml
-
-- name: Install python-dev
- apt:
- name: 'python-dev'
- state: 'present'
- update_cache: True
- tags: install-python-dev
-
-- name: Install python-virtualenv
- apt:
- name: 'python-virtualenv'
- state: 'present'
- update_cache: True
- tags: install-python-virtualenv
-
-- name: Install python pip
- apt:
- name: 'python-pip'
- state: 'present'
- update_cache: True
- tags: install-python-pip
-
-- name: Install libpcap-dev
- apt:
- name: 'libpcap-dev'
- state: 'present'
- update_cache: True
- tags: install-libpcap-dev
-
-- name: Install cpufrequtils
- apt:
- name: 'cpufrequtils'
- state: 'present'
- update_cache: True
- tags: install-cpufrequtils
-
-- name: Install cgroup-support
- apt:
- name: 'cgroup-bin'
- state: 'present'
- update_cache: True
- tags: install-cgroup-support
-
-- name: Install zlib1g-dev
- apt:
- name: 'zlib1g-dev'
- state: 'present'
- update_cache: True
- tags: install-zlib1g-dev
-
-- name: Install libnuma-dev
- apt:
- name: 'libnuma-dev'
- state: 'present'
- update_cache: True
- tags: install-libnuma-dev
-
-- name: Install Docker and role dependencies
- apt:
- name: "{{ item }}"
- state: "present"
- install_recommends: False
- with_items:
- - "apt-transport-https"
- - "ca-certificates"
- - "software-properties-common"
- - "cron"
- tags: install-docker
-
-- name: Install upstream APT GPG key
- apt_key:
- id: "{{ docker_apt_key }}"
- keyserver: "{{ ansible_local.core.keyserver
- if (ansible_local|d() and ansible_local.core|d() and
- ansible_local.core.keyserver)
- else 'hkp://pool.sks-keyservers.net' }}"
- state: "present"
- tags: install-docker
-
-- name: Install upstream APT repository
- apt_repository:
- repo: "{{ docker_repository }}"
- state: "present"
- update_cache: True
- tags: install-docker
-
-- name: Install Docker
- apt:
- name: "docker-{{ docker_edition }}={{ docker_apt_package_name }}"
- state: "present"
- update_cache: True
- install_recommends: False
- cache_valid_time: "{{ apt_cache_time }}"
- tags: install-docker
-
-- name: Remove Upstart config file
- file:
- path: "/etc/default/docker"
- state: "absent"
- tags: docker
-
-- name: Ensure systemd directory exists
- file:
- path: "/etc/systemd/system"
- state: "directory"
- owner: "root"
- group: "root"
- mode: "0755"
- tags: ensure-docker
-
-- name: Copy systemd unit file
- template:
- src: "templates/docker.service.j2"
- dest: "/etc/systemd/system/docker.service"
- owner: "root"
- group: "root"
- mode: "0644"
- register: docker_register_systemd_service
- tags: copy-docker
-
-- name: Reload systemd daemon
- command: "systemctl daemon-reload"
- notify: ["Restart Docker"]
- when: (docker_register_systemd_service and
- docker_register_systemd_service | changed)
- tags: restart-docker
-
-- name: Set specific users to "docker" group
- user:
- name: "{{ item }}"
- groups: "docker"
- append: True
- with_items: "{{ docker_users }}"
- when: docker_users
- tags: set-docker
-
-- name: Install upstream APT GPG key
- apt_key:
- id: "{{ kubernetes_apt_key }}"
- keyserver: "{{ ansible_local.core.keyserver
- if (ansible_local|d() and ansible_local.core|d() and
- ansible_local.core.keyserver)
- else 'hkp://pool.sks-keyservers.net' }}"
- state: "present"
- tags: install-kubernetes
-
-- name: Install upstream APT repository
- apt_repository:
- repo: "{{ kubernetes_repository }}"
- state: "present"
- update_cache: True
- tags: install-kubernetes
-
-- name: Install kubeadm
- apt:
- name: "kubeadm={{ kubernetes_apt_package_name }}"
- state: "present"
- update_cache: True
- install_recommends: False
- cache_valid_time: "{{ apt_cache_time }}"
- tags: install-kubernetes
-
-- name: Install kubectl
- apt:
- name: "kubectl={{ kubernetes_apt_package_name }}"
- state: "present"
- update_cache: True
- install_recommends: False
- cache_valid_time: "{{ apt_cache_time }}"
- tags: install-kubernetes
-
-- name: Install kubelet
- apt:
- name: "kubelet={{ kubernetes_apt_package_name }}"
- state: "present"
- update_cache: True
- install_recommends: False
- cache_valid_time: "{{ apt_cache_time }}"
- tags: install-kubernetes
-
+--- +# file: roles/tg_sut/tasks/ubuntu_x86_64.yaml + +- name: Install python-dev + apt: + name: 'python-dev' + state: 'present' + update_cache: True + tags: install-python-dev + +- name: Install python-virtualenv + apt: + name: 'python-virtualenv' + state: 'present' + update_cache: True + tags: install-python-virtualenv + +- name: Install python pip + apt: + name: 'python-pip' + state: 'present' + update_cache: True + tags: install-python-pip + +- name: Install libpcap-dev + apt: + name: 'libpcap-dev' + state: 'present' + update_cache: True + tags: install-libpcap-dev + +- name: Install cpufrequtils + apt: + name: 'cpufrequtils' + state: 'present' + update_cache: True + tags: install-cpufrequtils + +- name: Install cgroup-support + apt: + name: 'cgroup-bin' + state: 'present' + update_cache: True + tags: install-cgroup-support + +- name: Install zlib1g-dev + apt: + name: 'zlib1g-dev' + state: 'present' + update_cache: True + tags: install-zlib1g-dev + +- name: Install libnuma-dev + apt: + name: 'libnuma-dev' + state: 'present' + update_cache: True + tags: install-libnuma-dev + +- name: Install Docker and role dependencies + apt: + name: "{{ item }}" + state: "present" + install_recommends: False + with_items: + - "apt-transport-https" + - "ca-certificates" + - "software-properties-common" + - "cron" + tags: install-docker + +- name: Install upstream APT GPG key + apt_key: + id: "{{ docker_apt_key }}" + keyserver: "{{ ansible_local.core.keyserver + if (ansible_local|d() and ansible_local.core|d() and + ansible_local.core.keyserver) + else 'hkp://pool.sks-keyservers.net' }}" + state: "present" + tags: install-docker + +- name: Install upstream APT repository + apt_repository: + repo: "{{ docker_repository }}" + state: "present" + update_cache: True + tags: install-docker + +- name: Install Docker + apt: + name: "docker-{{ docker_edition }}={{ docker_apt_package_name }}" + state: "present" + update_cache: True + install_recommends: False + cache_valid_time: "{{ apt_cache_time }}" + tags: install-docker + +- name: Remove Upstart config file + file: + path: "/etc/default/docker" + state: "absent" + tags: docker + +- name: Ensure systemd directory exists + file: + path: "/etc/systemd/system" + state: "directory" + owner: "root" + group: "root" + mode: "0755" + tags: ensure-docker + +- name: Copy systemd unit file + template: + src: "templates/docker.service.j2" + dest: "/etc/systemd/system/docker.service" + owner: "root" + group: "root" + mode: "0644" + register: docker_register_systemd_service + tags: copy-docker + +- name: Reload systemd daemon + command: "systemctl daemon-reload" + notify: ["Restart Docker"] + when: (docker_register_systemd_service and + docker_register_systemd_service | changed) + tags: restart-docker + +- name: Set specific users to "docker" group + user: + name: "{{ item }}" + groups: "docker" + append: True + with_items: "{{ docker_users }}" + when: docker_users + tags: set-docker + +- name: Install upstream APT GPG key + apt_key: + id: "{{ kubernetes_apt_key }}" + keyserver: "{{ ansible_local.core.keyserver + if (ansible_local|d() and ansible_local.core|d() and + ansible_local.core.keyserver) + else 'hkp://pool.sks-keyservers.net' }}" + state: "present" + tags: install-kubernetes + +- name: Install upstream APT repository + apt_repository: + repo: "{{ kubernetes_repository }}" + state: "present" + update_cache: True + tags: install-kubernetes + +- name: Install kubeadm + apt: + name: "kubeadm={{ kubernetes_apt_package_name }}" + state: "present" + update_cache: True + install_recommends: False + cache_valid_time: "{{ apt_cache_time }}" + tags: install-kubernetes + +- name: Install kubectl + apt: + name: "kubectl={{ kubernetes_apt_package_name }}" + state: "present" + update_cache: True + install_recommends: False + cache_valid_time: "{{ apt_cache_time }}" + tags: install-kubernetes + +- name: Install kubelet + apt: + name: "kubelet={{ kubernetes_apt_package_name }}" + state: "present" + update_cache: True + install_recommends: False + cache_valid_time: "{{ apt_cache_time }}" + tags: install-kubernetes + |