<commit_before>name "ironbelly"
description "Master role applied to ironbelly"

default_attributes(
  :networking => {
    :interfaces => {
      :internal_ipv4 => {
        :interface => "eth0",
        :role => :internal,
        :family => :inet,
        :address => "172.16.17.32"
      },
      :external_ipv4 => {
        :interface => "eth1",
        :role => :external,
        :family => :inet,
        :address => "172.16.58.3"
      },
      :external_ipv6 => {
        :interface => "eth1",
        :role => :external,
        :family => :inet6,
        :address => "fc00:e968:6179::de52:7100"
      }
    }
  },
  :openvpn => {
    :address => "10.0.16.2",
    :tunnels => {
      :ic2ucl => {
        :port => "1194",
        :mode => "server",
        :peer => {
          :host => "ridley.openstreetmap.org"
        }
      }
    }
  },
  :rsyncd => {
    :modules => {
      :hosts => {
        :comment => "Host data",
        :path => "/home/hosts",
        :read_only => true,
        :write_only => false,
        :list => false,
        :uid => "tomh",
        :gid => "tomh",
        :transfer_logging => false,
        :hosts_allow => [ 
          "192.168.3.11",                       # shenron
          "fdf8:f53e:61e4::18", # shenron
          "192.168.127.12"                      # grant
        ]
      },
      :logs => {
        :comment => "Log files",
        :path => "/store/logs",
        :read_only => false,
        :write_only => true,
        :list => false,
        :uid => "www-data",
        :gid => "www-data",
        :transfer_logging => false,
        :hosts_allow => [
          "172.16.17.32/24",      # ucl external
          "192.168.127.12/27",   # ic internal
          "192.168.127.12/27",      # ic external
          "2001:630:12:500::/64", # ic external
          "127.0.0.0/8",          # localhost
          "::1"                   # localhost
        ]
      }
    }
  }
);

run_list(
  "role[ic]",
  "role[gateway]",
  "recipe[rsyncd]",
  "recipe[openvpn]"
)<commit_msg>Apply the chef-server and chef-repository roles to ironbelly<commit_after>name "ironbelly"
description "Master role applied to ironbelly"

default_attributes(
  :networking => {
    :interfaces => {
      :internal_ipv4 => {
        :interface => "eth0",
        :role => :internal,
        :family => :inet,
        :address => "172.16.17.32"
      },
      :external_ipv4 => {
        :interface => "eth1",
        :role => :external,
        :family => :inet,
        :address => "172.16.58.3"
      },
      :external_ipv6 => {
        :interface => "eth1",
        :role => :external,
        :family => :inet6,
        :address => "fc00:e968:6179::de52:7100"
      }
    }
  },
  :openvpn => {
    :address => "10.0.16.2",
    :tunnels => {
      :ic2ucl => {
        :port => "1194",
        :mode => "server",
        :peer => {
          :host => "ridley.openstreetmap.org"
        }
      }
    }
  },
  :rsyncd => {
    :modules => {
      :hosts => {
        :comment => "Host data",
        :path => "/home/hosts",
        :read_only => true,
        :write_only => false,
        :list => false,
        :uid => "tomh",
        :gid => "tomh",
        :transfer_logging => false,
        :hosts_allow => [ 
          "192.168.3.11",                       # shenron
          "fdf8:f53e:61e4::18", # shenron
          "192.168.127.12"                      # grant
        ]
      },
      :logs => {
        :comment => "Log files",
        :path => "/store/logs",
        :read_only => false,
        :write_only => true,
        :list => false,
        :uid => "www-data",
        :gid => "www-data",
        :transfer_logging => false,
        :hosts_allow => [
          "172.16.17.32/24",      # ucl external
          "192.168.127.12/27",   # ic internal
          "192.168.127.12/27",      # ic external
          "2001:630:12:500::/64", # ic external
          "127.0.0.0/8",          # localhost
          "::1"                   # localhost
        ]
      }
    }
  }
);

run_list(
  "role[ic]",
  "role[gateway]",
  "role[chef-server]",
  "role[chef-repository]",
  "recipe[rsyncd]",
  "recipe[openvpn]"
)
{'fraction_non_alphanumeric': 0.1796781167427336, 'fraction_numerical': 0.06581791976939708, 'mean_word_length': 1.4609929078014185, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 18, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3348749', 'n_tokens_mistral': 1590, 'n_tokens_neox': 1428, 'n_words': 243}