Score:0

Setting apache2.conf variables with Ansible issue

bh flag

i have a simple ansible playbook that sets two ini variables.

- name: set Apache timeout
  community.general.ini_file:
    path: /etc/apache2/apache2.conf
    section: null
    option: Timeout
    value: 900
    state: present
    exclusive: true

- name: set Proxy timeout
  community.general.ini_file:
    path: /etc/apache2/apache2.conf
    section: null
    option: ProxyTimeout
    value: 900
    state: present
    exclusive: true

Problem is that it sets them like

Timeout = 900
ProxyTimeout = 900

But i need them to be set like, WITHOUT "="

Timeout 900
ProxyTimeout 900
Score:1
bh flag

This works if anyone is curious

- name: set Timeout
  ansible.builtin.lineinfile:
    path: /etc/apache2/apache2.conf
    regexp: '^Timeout '
    insertafter: '^#Timeout '
    line: Timeout 900

- name: set Proxy timeout
  ansible.builtin.lineinfile:
    path: /etc/apache2/apache2.conf
    regexp: '^ProxyTimeout '
    insertafter: '^Timeout '
    line: ProxyTimeout 900
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.