1

I am using Ansible to install the Nginx packages on my Slave1 server from Master server (Note- both Master & Slave server's are having Ubuntu 18.04 and i am running these inside Docker containers), but everytime i am running the Ansible command to do this, getting below error. I am stuck here, what is the solution for this. Please heklp me in debugging this issue.

root@afb19093484e:/# ansible Slave1 -m apt -a "name=nginx state=present"


172.17.0.3 | FAILED! => {
    "changed": false, 
    "cmd": "apt-get update", 
    "msg": "E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 3d 21h 33min 13s). Updates for this repository will not be applied.\nE: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 3d 23h 23min 36s). Updates for this repository will not be applied.", 
    "rc": 100, 
    "stderr": "E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 3d 21h 33min 13s). Updates for this repository will not be applied.\nE: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 3d 23h 23min 36s). Updates for this repository will not be applied.\n", 
    "stderr_lines": [
        "E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 3d 21h 33min 13s). Updates for this repository will not be applied.", 
    ], 
AlexP
  • 10,037
  • 1
  • 32
  • 39
Pankaj Navneet
  • 19
  • 1
  • 1
  • 3
  • Check the time on your computer system (use the command `date` for this). – AlexP May 28 '18 at 17:33
  • make sure time and date in slave1 synced – Javad Hajiani May 30 '18 at 07:30
  • Thanks for your reply guys. It worked for me :) there was time difference on both server's. Synced the time and things worked. – Pankaj Navneet Jun 01 '18 at 08:24
  • @PankajNavneet if HairyNetworkAdmin's answer below was the correct solution, can you please mark it accepted? This helps folks with the same problem find answers easier :) – Doktor J Dec 06 '18 at 21:56
  • 2
    Possible duplicate of [sudo apt update error: "Release file is not yet valid"](https://askubuntu.com/questions/1096930/sudo-apt-update-error-release-file-is-not-yet-valid) – karel Nov 26 '19 at 16:13

1 Answers1

5

Make sure that the system clock is set to UTC, and is within a few minutes of UTC.