Commit 149d52fa authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

Merge remote-tracking branch 'origin/master'

parents decaca8f 0021ad02
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
---

- name: python3
- name: Install python3
  hosts: ipacluster
  become: yes
  tasks:
    - name: Bootstrap a host without python3 installed
      raw: ( test -n "$(which yum)" && yum install -y python3 || true ) ; ( test -n "$(which apt)" && apt install -y python3 || true ) ; ( test -n "$(which apk)" && apk add -y python3 || true )

- name: hostname
- name: Set hostname
  hosts: hostname:&ipacluster
  become: yes
  roles:
    - hostname

- name: Build hosts file
  lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present
  when: hostvars[item].ansible_default_ipv4.address is defined
  with_items: groups['ipaserver','ipareplicas']