diff --git a/roles/base/tasks/core_cert.yml b/roles/base/tasks/core_cert.yml index 1be20c5..5704dce 100644 --- a/roles/base/tasks/core_cert.yml +++ b/roles/base/tasks/core_cert.yml @@ -17,6 +17,18 @@ when: ansible_python_version is version('3', '>=') become: false +- name: check if pip3 file exists + stat: + path: /bin/pip3 + register: pip3_status + +- name: Create a symbolic link for pip + file: + src: /usr/local/bin/pip3 + dest: /bin/pip3 + state: link + when: pip3_status.stat.exists == false + - name: Install latest python2-cryptography package: name: python2-cryptography @@ -30,7 +42,7 @@ executable: pip3 state: latest when: ansible_python_version is version('3', '>=') - become: false + become: true - name: Ensure directory exists for local self-signed TLS certs file: diff --git a/roles/base/tasks/core_hostname.yml b/roles/base/tasks/core_hostname.yml index 459a2f5..f5a7b5b 100644 --- a/roles/base/tasks/core_hostname.yml +++ b/roles/base/tasks/core_hostname.yml @@ -13,7 +13,7 @@ lineinfile: dest: /etc/hosts regexp: '^127\.0\.0\.1[ \t]+localhost' - line: '127.0.0.1 localhost {{ base_core_hostname }}' + line: '127.0.0.1 {{ base_core_hostname }} localhost' state: present - name: Ensure hostname is set in /etc/hosts