copr: auto-setup the ipv6 configuration

Turns out that, even though IPv6 is configured on the initial VM boot,
the IPv6 needs manual tweeks and reboot (or nmcli dance).  Related to:
https://pavel.raiskup.cz/blog/switch-fedora-box-to-ipv6-in-aws.html
This commit is contained in:
Pavel Raiskup 2021-11-30 13:28:59 +01:00
parent 55e48236b9
commit a9c8dda4ca
5 changed files with 31 additions and 0 deletions

View file

@ -47,3 +47,5 @@ tcp_ports: [
9100,
]
services_disabled: false
aws_ipv6_addr: "2600:1f18:8ee:ae00:6c8c:e094:1c5b:c2f9/128"

View file

@ -13,3 +13,5 @@ letsencrypt:
predefined_deploy_script: httpd
tcp_ports: [22, 80, 443]
services_disabled: false
aws_ipv6_addr: "2600:1f18:8ee:ae00:691b:4103:dbcd:a64a/128"

View file

@ -28,3 +28,5 @@ letsencrypt:
predefined_deploy_script: httpd
tcp_ports: [22, 80, 443]
services_disabled: false
aws_ipv6_addr: "2600:1f18:8ee:ae00:66a:fd15:3f16:4092/128"

View file

@ -6,3 +6,5 @@ datacenter: aws
freezes: false
tcp_ports: [22]
services_disabled: false
aws_ipv6_addr: "2600:1f18:8ee:ae00:3cbb:7920:d83:e607/128"

View file

@ -86,5 +86,28 @@
- config
when: datacenter != "aws"
- name: setup ipv6 networking general
lineinfile:
dest: /etc/sysconfig/network-scripts/ifcfg-eth0
backup: yes
state: present
line: "{{ item }}"
with_items:
- IPV6INIT=yes
- IPV6_DEFROUTE=yes
- IPV6_AUTOCONF=yes
when: aws_ipv6_addr is defined
tags: ipv6_config
- name: setup ipv6 address
lineinfile:
dest: /etc/sysconfig/network-scripts/ifcfg-eth0
backup: yes
state: present
line: "{{ aws_ipv6_addr }}"
regex: ^IPV6ADDR=
when: aws_ipv6_addr is defined
tags: ipv6_config
# - name: enable and run logrotate service
# service: name="logrotate" state=started