From 86b4155127b21560815d22bf8bde04dc7a5267cf Mon Sep 17 00:00:00 2001 From: bondarau Date: Wed, 10 Jun 2020 15:49:20 +0300 Subject: [PATCH] add fqdn record to /etc/hosts file (#16) * add fqdn record to /etc/hosts file * update python Co-authored-by: Ruslan Bondarau --- .travis.yml | 6 +++--- tasks/yhealthcheck.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 18721c8..16e977c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ sudo: required language: python python: - - "2.7" + - "3.7" services: - docker @@ -13,8 +13,8 @@ before_install: - git clone https://github.com/lean-delivery/ansible-lint-rules.git ~/ansible-lint-rules install: - - pip install --upgrade ansible==2.7.* docker-py molecule==2.20 pyOpenSSL PyYAML pytest - - pip install git+https://github.com/ansible/ansible-lint.git + - pip3 install --upgrade ansible==2.9.* docker molecule==2.22 pyOpenSSL PyYAML pytest + - pip3 install git+https://github.com/ansible/ansible-lint.git@v4.3.0a0 - ansible --version - ansible-lint --version diff --git a/tasks/yhealthcheck.yml b/tasks/yhealthcheck.yml index 73d366f..da73ac2 100644 --- a/tasks/yhealthcheck.yml +++ b/tasks/yhealthcheck.yml @@ -24,7 +24,7 @@ - name: Add localaddr record to hosts blockinfile: path: /etc/hosts - block: '{{ ansible_default_ipv4.address }} localaddr' + block: '{{ ansible_default_ipv4.address }} localaddr {{ ansible_fqdn }}' marker: '# {mark} ANSIBLE MANAGED BLOCK' when: set_localaddr become: true