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/main.yaml | |
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/main.yaml')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml | 18 |
1 files changed, 17 insertions, 1 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 |