config-host.yml 401 B

12345678910111213141516
  1. - name: Search for host_type in host.conf
  2. ansible.builtin.lineinfile:
  3. dest: /etc/yunion/host.conf
  4. regexp: '^host_type: \w+$'
  5. line: 'host_type: container'
  6. backup: yes
  7. state: present
  8. failed_when: false
  9. - name: show host_type result
  10. shell: |
  11. cat /etc/yunion/host.conf | grep host_type
  12. register: host_type_ret
  13. failed_when: false
  14. - debug: var=host_type_ret.stdout_lines