Loading run.yml +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'] Loading
run.yml +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']