[maintainer-test] lets try update without creating the file

This commit is contained in:
Mark O'Brien 2020-07-24 11:21:44 +01:00
parent e6c0433e19
commit d95a26b3e7
2 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,5 @@
ansible_ssh_user: fedora
ansible_become_user: root
ansible_become: yes
datacenter: aws
inventory_hostname: "f31-test.fedorainfracloud.org"

View file

@ -69,12 +69,37 @@
tags:
- packages
- name: check if file can be created
copy:
content: ""
dest: /etc/sysconfig/global-update-applied
force: no
when: inventory_hostname.startswith(('f31-test'))
tags:
- packages
- name: remove test file
file:
path: /etc/sysconfig/global-update-applied
state: absent
when: inventory_hostname.startswith(('f31-test'))
tags:
- packages
- name: update all
command: dnf -y update creates=/etc/sysconfig/global-update-applied
register: updated
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora' and ansible_cmdline.ostree is not defined
tags:
- packages
when: not inventory_hostname.startswith(('f31-test'))
- name: update all
command: dnf -y
when: inventory_hostname.startswith(('f31-test'))
tags:
- packages
- name: write out global-update-applied file if we updated
copy: content="updated" dest=/etc/sysconfig/global-update-applied