---
# 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'
lineinfile:
path: '/etc/hosts'
regexp: '^{{ ansible_default_ipv4.address }}.+$'
- line: '{{ ansible_default_ipv4.address }} {{ hostname }}.linuxfoundation.org'
+ line: '{{ ansible_default_ipv4.address }} {{ hostname }}.{{ name_servers_search }}'
tags: set-hostname
- name: Set sudoers admin
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