diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-02-20 12:19:07 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-02-22 16:05:38 +0000 |
commit | 53153e114017d193cdf9b88f21f4eac31bad72b7 (patch) | |
tree | 6cbe624d67ec51733928ea4a54a50d613b4b94c5 /resources/tools/testbed-setup/ansible/roles/common/tasks | |
parent | 138c1b1f56a2b59afeafb92379e955b9baf95e7a (diff) |
CSIT-1437 Create portable host-setup document
- Ansible simplified and optimalized
- Porting global variables into single file
- Rework the README.md
- Tested outside LF environemnt
Change-Id: I124cffa5c4510edf365e8b558da0c8c498f55d50
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/common/tasks')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml | 18 | ||||
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml | 51 |
2 files changed, 29 insertions, 40 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml index 38d8188be8..1481536034 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml @@ -1,6 +1,14 @@ --- # file: roles/common/tasks/main.yaml +- name: Add permanent proxy settings + lineinfile: + path: "/etc/environment" + state: "present" + line: "{{ item.key }}={{ item.value }}" + with_dict: "{{ proxy_env }}" + when: proxy_env is defined + - name: Ubuntu specific import_tasks: ubuntu.yaml when: ansible_distribution|lower == 'ubuntu' @@ -14,7 +22,7 @@ lineinfile: path: '/etc/hosts' regexp: '^{{ ansible_default_ipv4.address }}.+$' - line: '{{ ansible_default_ipv4.address }} {{ hostname }}.linuxfoundation.org' + line: '{{ ansible_default_ipv4.address }} {{ hostname }}.{{ domain }}' tags: set-hostname - name: Set sudoers admin @@ -44,3 +52,11 @@ mode: '644' notify: ['Update GRUB'] tags: copy-grub + +- name: Add permanent proxy settings + lineinfile: + path: "/etc/environment" + state: "present" + line: "{{ item.key }}={{ item.value }}" + with_dict: "{{ proxy_env }}" + when: proxy_env is defined diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml index ff47ffc656..ae606cd494 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/ubuntu.yaml @@ -15,44 +15,17 @@ tags: copy-apt-sources when: ansible_machine == 'x86_64' -- name: Install python-apt +- name: Install CSIT dependencies apt: - name: 'python-apt' + name: '{{ item }}' state: 'present' - update_cache: True - tags: install-python-apt - -- name: Install git - apt: - name: 'git' - state: 'present' - update_cache: True - tags: install-git - -- name: Install crudini - apt: - name: 'crudini' - state: 'present' - update_cache: True - tags: install-crudini - -- name: Install expect - apt: - name: 'expect' - state: 'present' - update_cache: True - tags: install-expect - -- name: Install socat - apt: - name: 'socat' - state: 'present' - update_cache: True - tags: install-socat - -- name: Install qemu - apt: - name: 'qemu-system' - state: 'present' - update_cache: True - tags: install-qemu + install_recommends: False + with_items: + - 'python-apt' + - 'python-setuptools' + - 'git' + - 'crudini' + - 'expect' + - 'socat' + - 'qemu-system' + tags: install-csit-dependencies |