[maintainer-test] lets try update without creating the file
This commit is contained in:
parent
e6c0433e19
commit
d95a26b3e7
2 changed files with 30 additions and 0 deletions
5
inventory/host_vars/f31-test.fedorainfracloud.org
Normal file
5
inventory/host_vars/f31-test.fedorainfracloud.org
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
ansible_ssh_user: fedora
|
||||||
|
ansible_become_user: root
|
||||||
|
ansible_become: yes
|
||||||
|
datacenter: aws
|
||||||
|
inventory_hostname: "f31-test.fedorainfracloud.org"
|
|
@ -69,12 +69,37 @@
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- 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
|
- name: update all
|
||||||
command: dnf -y update creates=/etc/sysconfig/global-update-applied
|
command: dnf -y update creates=/etc/sysconfig/global-update-applied
|
||||||
register: updated
|
register: updated
|
||||||
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora' and ansible_cmdline.ostree is not defined
|
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora' and ansible_cmdline.ostree is not defined
|
||||||
tags:
|
tags:
|
||||||
- packages
|
- 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
|
- name: write out global-update-applied file if we updated
|
||||||
copy: content="updated" dest=/etc/sysconfig/global-update-applied
|
copy: content="updated" dest=/etc/sysconfig/global-update-applied
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue