I have the following, but it fails. Do I have a syntax issue or something? I can’t seem to find the problem.
`
- hosts: “{{ host }}”
tasks: - name: Remove GUI
yum:
name: “{{ item }}”
state: absent
with_items: - “@Console internet tools”
- “@General Purpose Desktop”
- “@Graphical Administration Tools”
- “@Graphics Creation Tools”
- “@Internet Browser”
- “@KDE Desktop”
- “@Legacy X Window System compatibility”
- “@Remote Desktop Clients”
- “@TeX support”
- “@Technical Writing”
- “@X Window System”
- “@Desktop”
- “@Desktop Debugging and Performance Tools”
- “@Dial-up Networking Support”
- “@Remote Desktop Clients”
`
Result:
`
TASK [Remove GUI]
failed: [ansible-oel6] (item=[u’@Console internet tools’, u’@General Purpose Desktop’, u’@Graphical Administration Tools’, u’@Graphics Creation Tools’, u’@Internet Browser’, u’@KDE Desktop’, u’@Legacy X Window System compatibility’, u’@Remote Desktop Clients’, u’@TeX support’, u’@Technical Writing’, u’@X Window System’, u’@Desktop’, u’@Desktop Debugging and Performance Tools’, u’@Dial-up Networking Support’, u’@Remote Desktop Clients’]) => {“changed”: false, “failed”: true, “item”: [“@Console internet tools”, “@General Purpose Desktop”, “@Graphical Administration Tools”, “@Graphics Creation Tools”, “@Internet Browser”, “@KDE Desktop”, “@Legacy X Window System compatibility”, “@Remote Desktop Clients”, “@TeX support”, “@Technical Writing”, “@X Window System”, “@Desktop”, “@Desktop Debugging and Performance Tools”, “@Dial-up Networking Support”, “@Remote Desktop Clients”], “msg”: “”, “rc”: 0, “results”: [“@Console internet tools is not installed”, “@General Purpose Desktop is not installed”, “@Graphical Administration Tools is not installed”, “@Graphics Creation Tools is not installed”, “@Internet Browser is not installed”, “@KDE Desktop is not installed”, “@Legacy X Window System compatibility is not installed”, “@Remote Desktop Clients is not installed”, “@TeX support is not installed”, “@Technical Writing is not installed”, “@X Window System is not installed”, “@Desktop is not installed”, “@Dial-up Networking Support is not installed”, “@Remote Desktop Clients is not installed”, “Loaded plugins: security\nSetting up Remove Process\nNo Packages marked for removal\n”]}
PLAY RECAP *******************************************************************************************************************************************************************************************************************************
ansible-oel6 : ok=1 changed=0 unreachable=0 failed=1
`